Add docs for non SES, non Mailgun SMTP settings
In reference to: https://github.com/TryGhost/Docs/blob/45ae446f8bf8c0b9415015d13e1cacd5ff17aa13/config.mdx?plain=1#L217-L352
I use MailerSend in particular for sending my emails. I have to configure Ghost using SMTP, and I self-host on Digital Ocean. DO blocks ports 465, 587, and 25 by default— and so does Linode and some other cloud providers— but MailerSend also uses Port 2525 as a backup.
For custom email ports, it's not going to STARTTLS automatically, because t's non-standard. In these cases, you need to explicitly tell Nodemailer to not use SSL connection (secure: true), and instead require TLS, and the TLS version number. Here's a sample config:
mail__transport=SMTP
mail__from="'Fulanito Lopez' <[email protected]>"
mail__options__host=smtp.mailersend.net
mail__options__port=2525
mail__options__secure=false. # critical: STARTTLS, not SSL-on-connect—must be false
mail__options__requireTLS=true # insist on STARTTLS
mail__options__tls__minVersion=TLSv1.2 # MailerSend requires TLSv1.2
mail__options__auth__user=YOUR_SMTP_USER
mail__options__auth__pass=YOUR_SMTP_PASS
{
"mail": {
"from": "'Fulanito Lopez' <[email protected]>",
"transport": "SMTP",
"options": {
"host": "smtp.mailersend.net",
"port": 2525,
"secure": false,
"requireTLS": true,
"tls": {
"minVersion": "TLSv1.2"
},
"auth": {
"user": "YOUR_SMTP_USER",
"pass": "YOUR_SMTP_PASS"
}
}
}
}
Thank you! Great note - PR welcome for improved example