I am running self-hosted on Linode server and having issues with all transactional emails. Bulk email works just fine for sending newsletter (through Mailgun).
I edited my config.production.json for my mailgun SMTP credentials:
[2022-03-01 10:00:30] ERROR
NAME: EmailError
CODE: ETIMEDOUT
MESSAGE: Failed to send email. Reason: Connection timeout.
level: normal
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
Error: Connection timeout
at createMailError (/var/www/<sitename>/versions/4.35.0/core/server/services/mail/GhostMailer.js:67:12)
at SMTPConnection._formatError (/var/www/<sitename>/versions/4.35.0/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
at SMTPConnection._onError (/var/www/<sitename>/versions/4.35.0/node_modules/nodemailer/lib/smtp-connection/index.js:770:20)
at Timeout.<anonymous> (/var/www/<sitename>/versions/4.35.0/node_modules/nodemailer/lib/smtp-connection/index.js:229:22)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
I think the problem is due to the VPS host, Linode, blocking mail ports including 587. To have those opened up, you have to open a support ticket in Linode and give them some information.
I’ve seen other similar questions to mine with no replies/solutions so want to keep this updated as reference for others who may have the same issue.
Don’t see how to mark something as the solution, but this was indeed the solution to issue. If you’re having issues with transactional email, may want to look into whether those ports are open or if they’ve been blocked.
Not sure why Ghost doesn’t just use API for transactional email though. At least as an option would be nice.
If you are having problems with sending Transactional email. You can use AWS SES! It’s easy to setup and configure. Moreover, its very cheap compared any other services out there.