After migrating from CLI to the Docker image, I thought all was fine, but I don’t seem to be able to send emails (specifically, inviting Admins).
I use Protonmail’s services as my SMTP server. It’s always worked in the past just fine on the CLI version of Ghost. I’ve verified that I am able to connect to Protonmail’s SMTP server on port 587.
Mailgun is set up too, but from my understanding, that’s not relevant here.
Here are the relevant settings in the .env, and the log files when I attempt to resend an invite:
mail__transport=SMTP
mail__options__host=smtp.protonmail.ch
mail__options__port=587
mail__options__secure=false
mail__options__auth__user=admin@xxxxxxx.xxx
mail__options__auth__pass=XXXXXXXXXXXXXXXX
ghost-1 | [2025-08-15 22:34:38] WARN Error sending email: Failed to send email. Reason: Sending failed. Please check your email settings and resend the invitation.
ghost-1 | [2025-08-15 22:34:38] ERROR “POST /ghost/api/admin/invites/” 500 840ms
ghost-1 |
ghost-1 | Error sending email: Failed to send email. Reason: Sending failed. Please check your email settings and resend the invitation.
ghost-1 |
ghost-1 | “Please see Configuration - Ghost Developer Docs for instructions on configuring email.”
ghost-1 |
ghost-1 | Error ID:
ghost-1 | 070e65f0-7a28-11f0-92e0-7be8b2ef36af
ghost-1 |
ghost-1 | ----------------------------------------
ghost-1 |
ghost-1 | Error: Sending failed
ghost-1 | at createMailError (/var/lib/ghost/versions/6.0.3/core/server/services/mail/GhostMailer.js:81:12)
ghost-1 | at DirectMailer. (/var/lib/ghost/versions/6.0.3/node_modules/nodemailer-direct-transport/lib/direct-transport.js:157:41)
ghost-1 | at DirectMailer. (/var/lib/ghost/versions/6.0.3/node_modules/nodemailer-direct-transport/lib/direct-transport.js:228:30)
ghost-1 | at /var/lib/ghost/versions/6.0.3/node_modules/nodemailer-direct-transport/lib/direct-transport.js:350:28
ghost-1 | at callback (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:374:14)
ghost-1 | at SMTPConnection. (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:385:20)
ghost-1 | at SMTPConnection._actionMAIL (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:1252:16)
ghost-1 | at SMTPConnection. (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:759:14)
ghost-1 | at SMTPConnection._processResponse (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:669:16)
ghost-1 | at SMTPConnection._onData (/var/lib/ghost/versions/6.0.3/node_modules/smtp-connection/lib/smtp-connection.js:493:10)
ghost-1 | at Socket.emit (node:events:518:28)
ghost-1 | at addChunk (node:internal/streams/readable:561:12)
ghost-1 | at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
ghost-1 | at Readable.push (node:internal/streams/readable:392:5)
ghost-1 | at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
Edit:
I left out some additional things in the .env:
Configuration imported from existing Ghost install at /var/www/xxxxxxxxx
mail__from=“‘xxxxxxxx.xxx’ admin@xxxxxxx.xxx”
mail__transport=Direct
mail__options__host=smtp.protonmail.ch
mail__options__port=587
mail__options__secureConnection=true
mail__options__ignoreTLS=true
mail__options__auth__user=admin@xxxxxx.xxx
mail__options__auth__pass=XXXXXXXXXXXXXXXX
security__staffDeviceVerification=true
Some of these variables seem to be duplicated in the .env file. Is that a problem?
In addition, I’ve been trying combinations true/false when it comes to TLS and secure connections, and one of the errors in one of those combinations resulted in:
Error sending email: Failed to send email. Reason: Email has been temporarily rejected. Please check your email settings and resend the invitation.
A different error than ‘Sending failed’…