As a start, use curl like this: curl -iv ..., that way you’ll see both request and response headers.
Then, you can try and see which headers does swoosh use when sending the request. In the ideal case it’ll have a way for you to control them. And then try to equalize what you’ve seen on the CLI with curl and what your Elixir code does.
You sure the port 1025 is correct? Usually SMTP with STARTTLS is on port 587, ans SSL SMTP is on 465.
Also, Gmail SMTP is supposed to be used by interactive clients, not a backend server. They may have some rule based filtering and limiting that hinder your usage. I 'd stick to one of the following:
Thanks! Yes, the port was wrong, among other things. I had just copied it from an example, I did not realize I had to change it to a specific value.
It had to change the port to 465, and set tls: if_available. Port 587 did not work though.
Besides that, I found out that, despite what the Swoosh doc suggests, that the emails must have a text_body.
Now the emails are working.
And yes, I will move to some other SMTP server, I just wanted to do a few tests using my gmail account. Thanks for the suggestions!