Problem configuring email system on plesk - docker


i have a Ghost website running on Docker on my server. I use Plesk to manage the server so i hope someone have alredy my issue.

I passed to the recent version of Ghost, because i want to try the membership functionality, but the email system doesn’t work. On my server i found that my ip was blacklisted and i managed to un-blacklist my ip.

But the email doesn’t work. I have set a Mailgun account in order to have the email system working but i think i have some kind of misconfiguration.

On my environment variables i put:

I don’t know if the environment variables are right…

I have also put the dns settings to my Ionos account.

  • My URL:
  • Ghost version: 3.0.3
  • Error: Failed to send email. Reason: Invalid login - 535 5.7.0 Mailgun is not loving your login or password.

Thank you :slight_smile:

are you sure that is the mailgun username? (
I’m using mailgun too as a mail transport but have username with this format

Hi! Thank you for your reaply.

Yes you’re right, i have changed my username in, but again i have the same error message…

Maybe could be a problem with SMTP settings? I have to put this variable

Thank you so much


You should put that in mail__options__host env, make sure you already set mx record for mailgun.
After that, your mail service should be working.

Here is a full example of mine.



Thank you for your reply! Yes now is working in the administration, when i try to send a test or an invitation email everything work fine.

The problem still remain when i try to subscribe using stripe membership feature. I have tried with Casper theme and also with lyra and both when i put email and click subscribe nothing happen, the spinner begin and no error message appear (also in docker i cannot see the log).

I have the last Ghost version 3.1.0, and i have inserted the api keys for Stripe and also for Mailgun.

I am stupid… i’ve noticed now that i have put www in the environment variable for the url…

Thank you so much now everything works fine :slight_smile: