I haven’t found any example. Neither have I been able to even authenticate using the library Swooth
.
Is there any example? Has anyone done that?
my own Postfix server, SSL/TLS
# config/config.exs
config :sample, Sample.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: "smtp.avengers.com",
username: "tonystark",
password: "ilovepepperpotts",
ssl: true,
tls: :always,
auth: :always,
port: 1025,
dkim: [
s: "default", d: "domain.com",
private_key: {:pem_plain, File.read!("priv/keys/domain.private")}
],
retries: 2,
no_mx_lookups: false
wmnnd
November 24, 2018, 8:09pm
2
Have you tried not using the ssl: true
flag? It might override the port
setting and force it to 465
.
No, because on my postfix ssl is mandatory
wmnnd
November 26, 2018, 9:29pm
4
Like I said, it might fix the port to 465
, so give it a try.
Just consider also other mail servers that also support REST API like Postal .
We use this as an alternative to Sendgrid. (side by side)
It’s closed on the server
wmnnd
November 27, 2018, 2:48pm
8
I think we’re talking past each other. If you set ssl: true
, gen_smtp
sets the port to 465
. If you want to use TLS on port 1025
, you have to remove ssl: true
.
I just tried with my own postfix server. With ssl: true
, :gen_smtp
returns
{:error, :retries_exceeded,
{:network_failure, 'my.mail.server',
{:error, {:tls_alert, 'bad record mac'}}}}
With ssl: false
, the mailing is sucessful:
"2.0.0 Ok: queued as E11D9140608\r\n"
AstonJ
November 27, 2018, 3:43pm
10
kattair0ta8:
Read my question. People say that this helps sometimes.
This is the second time we’ve had to ask you not to be rude, so I’m suspending your account until next week and locking the thread for a while - if you want help from the community, please treat our members with the respect and courtesy they deserve.
If on your return you cannot be respectful we will unfortunately have no choice but to close your account.
For reference, here is my previous response to you:
If you want people to help you @kattair0ta8 , you’ll want to come across as someone who others actually feel like helping. Remember that people give up their free time to help others here - and nobody likes spending their precious time on those come across as rude or abrupt, or those who feel entitled . Unfortunately your posts are coming across as just that.
AstonJ
Opened
December 3, 2018, 8:00am
12
This topic was automatically opened after 5 days.