We’re having issues where we cannot invite any new staff into the account as admin / editors etc. We’re getting an error message telling us the invitation failed to send and to check our mailgun settings.
We’ve never had mailgun setup as we do not have subscribers etc, and have previously been able to invite users, so feels like something has changed in the setup.
Does anyone have ay suggestions? are we going to have to setup a mailgun account purely to allow us to manage users within the account?
The error is probably about your mail configuration:
Can you send other transactional emails like password resets for admin users, magic links for members, etc.? My guess is not.
I assume you’re self-hosting, right? In that case, check your Ghost server logs to see what errors you see there in regard to the emails. This should work by running ghost log in the directory you have Ghost installed:
If you’re self-hosting with Docker, run docker logs [your-container-name] to see what’s going on.
If you are not self-hosting, and on a managed hosting platform, reach out to their support, so they can have a look.
Going out on a limb (but read your logs like Jannis says) - your host recently reconfigured things so that you can’t use whatever port you’re currently using for transactional email. (This happened recently at Digital Ocean – ports that worked previously no longer do, with the exception of 2525 – for now..)
You don’t have to use Mailgun, but you do have to configure something that can send outbound transactional email. This is done in config.production.json, or with the equivalent environment variables.
"from" entry is important, otherwise it won’t work.
There are other options:
secure - if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension
pool - set to true to use pooled connections (defaults to false) instead of creating a new connection for every email
This is ridiculous to have email required for user login, I’m running an offline/intranet deployment, I’ve not enabled 2FA/MailFA.
When signed into one admin portal with the account its all fine.
When I try to sign into the admin portal with the same account but with a different cookie profile, the error appears.
This is with a vanilla deployment FYI.
Looks like Mail/2FA is enforced by default which is silly for self-host users who dont need it… I actually even played with resetting hashes originally which worked but the error log still complains about mail!
To be advised to only use older Ghost builds is silly also.
Thanks for the update, appreciate it.
Is there a user env var for docker deployments? Since config.production.json is in ephemeral storage, I’d like to pass it as an environment variable.
Edit: I assume its “security__staffDeviceVerification: disable”
Edit2: Confirming the above env_var works for docker deployments
since the latest update i need to have email setup locally to login into the ghost backend.
how can i disable auth code verification on localhost?
[2025-05-15 15:56:49] ERROR "POST /ghost/api/admin/session" 500 222ms
NAME: EmailError
MESSAGE: Failed to send email. Please check your site configuration and try again.
level: normal
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
EmailError: Failed to send email. Please check your site configuration and try again.
at Object.sendAuthCodeToUser (/Users/leonard/Documents/3_WORK/2025/surplus/ghost.nosync/versions/5.119.3/core/server/services/auth/session/session-service.js:284:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.createSession (/Users/leonard/Documents/3_WORK/2025/surplus/ghost.nosync/versions/5.119.3/core/server/services/auth/session/middleware.js:16:17)
[2025-05-15 15:57:29] ERROR "POST /ghost/api/admin/session" 500 435ms
NAME: EmailError
MESSAGE: Failed to send email. Please check your site configuration and try again.
level: normal
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
EmailError: Failed to send email. Please check your site configuration and try again.
at Object.sendAuthCodeToUser (/[redacted]/ghost.nosync/versions/5.119.3/core/server/services/auth/session/session-service.js:284:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.createSession (/[redacted]/ghost.nosync/versions/5.119.3/core/server/services/auth/session/middleware.js:16:17)