Forgot password or test emails from Ghost don't work

Ghost on Railway, SMTP configured via environment variables, UI hangs on Sending…, nothing appears in Mailgun logs.

Any insight on how to fix this issue?

Thanks.

Sounds like your transactional email is misconfigured. What do your server logs say?

server logs don’t have any trace of it. It’s actually a bit weird. When I publish a post on Ghost and send, it sends an email to the configured one.

However, the ones that don’t work and have deemed to be extremely challenging (despite working with Claude for hours going in a loop doing the Railway Ghost variable settings etc.,) are:

  1. forgot password (keeps spinning) on Ghost login page.
  2. Newsletters (test emails) don’t work.
  3. My new website (not published yet but in works) has an email subscription and the emails won’t be sent any email (this must be SMTP Mailgun issue?)

Railway Ghost deploy logs don’t have any errors or wont generate any trace during these email sending events.

Mailgun has no error logs.

Some email functionality works via API (I guess) but not SMTP. I logged a support ticket with Mailgun too.

thanks for reading and sharing your thoughts. Hoping to fix this issue soon enough.

Transactional email (magic link, password resets, etc) goes out via whatever method you’ve configured in config.production.json, or the env equivalent. Newsletters go out via your mailgun api key, set in the Ghost dashboard. These are separate, or least they can be. Sounds like your problem is transactional.

I don’t know enough about Railway to tell you where Ghost is logging, but it’s likely to be logging /somewhere/.

A couple things to check:

  1. You actually have it configured. “mail” is set to SMTP and you have set mail__options__server and mail__options__port set. If your mail is set to “Direct”, and you aren’t running an SMTP server locally (or that server isn’t actually configured such that anyone will accept email from it), that’s your problem. Or if you’re using your local SMTP server, most major mailbox providers are picky about who they accept email from, and unless you’ve done everything right (reverse pointer, dmarc, dkim, spf), they’re not likely to accept email from you.

  2. Your host isn’t blocking outbound SMTP ports. This is really common. Configuring outbound email to use an API service (mailgun or otherwise) is a good option in that case - examples for multiple providers are available on the forum and in the docs.