(exit) an exception was raised:
** (Bamboo.SMTPAdapter.SMTPError) There was a problem sending the email through SMTP.
The error is :no_more_hosts
More detail below:
{:permanent_failure, "smtp.gmail.com", "530-5.7.0 Authentication Required. Learn more at\r\n530 5.7.0 https://support.google.com/mail/?p=WantAuthError d18-20020a5d6452000000b00215859413f3sm4737143wrw.107 - gsmtp\r\n"}
If you are using free google smtp service it won’t work. It seems that Google is not providing anymore that service for ordinary gmail account.
I also used it to send mails in dev mode in my Phoenix projects. Now I just switched to Swoosh Smtp. The good thing with Swoosh is that it seems to be more actively maintained than Bamboo now. Swoosh has even a bult-in local email adapter to send mails in dev environment.
In production paid SMTP service is anyway the recommended solution I think or you can roll your own SMTP server ?
In fact this does not depend on Swoosh or Bamboo. There is no more free google smtp service.
The Swoosh.Adapters.Local is just a simulation of mails sending. The mails are not actually sent but it is convenient for serving pages useful for previewing emails in development.
Well you can ignore that part of the config if you don’t know what it is. I did it and it just works for me (of course not with free google smtp server).
As you can see I just commented the dkim part. It is not mandatory, my smtp server provider just provides me with a server name, a user name and a password. In the config I read them from environments variables: SMTP_SERVER, SMTP_USER and SMTP_PASS.
I’m afraid you willl have to use paid solutions for that. Most of the domain registrars will provide you with a smtp server for for basic mail exchanges or notifications though.
Maybe someone will know a still free smtp server solution but you can forget Google.
You still need to register to sendgrid and get a free account. Both Bamboo and Swoosh support Sendgrid pretty well. Also, Sendgrid defaults to mung the links in emails to add tracking, and most likely you don’t want to do that. You need to go in there and disable all tracking.
I setup Sendgrid with Swoosh and it was pretty painless to get it working once you get your API key after sign up. I think if you follow along the docs/guides of both you will get it working