Issues troubleshooting email

So, I have installed Discourse and I am having issues with the email.
I‘m using SparkPost and followed this guide.
Now I used the troubleshoot guide, and at the part where you‘re supposed to check the discourse logs is where I‘m at right now. I looked at them and found this:

Now, I understand this as an email was sent but something is not known or failed?
Could someone help me?

Where did you install Discourse?

Is DNS working correctly? Can you resolve the mail server address from the server?

I installed discord on a cloud server.

What exactly do you mean with can you resolve the mail server address from the server?

I mean can you use PING or NSLOOKUP to resolve the address you entered during discourse-setup for sparkpost?

Did you follow the standard install guide? How did you install Discourse onto the server?

The STMP address from SparkPost?

I did everything like in the guide. I installed it with docker.

The address of the SMTP server, which is a DNS name, not the SMTP address sparkpost is using, which would be in the format

Anything here?
(Sorry if this is hard…)


SSH into your server and do this:


Also, if you:

cat /var/discourse/containers/app.yml | grep ""

What’s the response?

If you don’t get back a line like this:


It’s very likely that you typo’d the address during discourse-setup, which would explain why your server can’t resolve it. You can re-run discourse-setup or edit the app.yml to correct it.


Since there is no response from this:

It means this:


If you’re SSH’d into the Discourse server and Discourse is installed in that path then yes.

You can check what’s in that line by doing this:

cat /var/discourse/containers/app.yml | grep "DISCOURSE_SMTP_ADDRESS:"

It should return something, if it doesn’t then there’s something more fundamental that’s awry with your setup.

Here we go

Oh I see it now, I wrote stmp even though it‘s smtp.

1 Like

Yep, so you transposed two characters, which led to an invalid mail server address. DNS resolution failed and gave you the original error.

You can:

  1. re-run discourse-setup if you would prefer a prompt-driven process
  2. edit it by hand using vi or nano
  3. Use this to automatically substitute it for you:

sed -i 's/' /var/discourse/containers/app.yml

Thanks for your help! I‘ll set it up the correct way now and I‘ll post in here again if it still does not work.


Good luck, it should be plain sailing from here, let us know if not.