Using Discourse with SparkPost

I can’t get my Discourse installation to work with SparkPost. Let’s say my domain is example.com. I have it registered and verified as a sending domain with SparkPost. The relevant part of my app.yml looks like this:
DISCOURSE_HOSTNAME: 'www.example.com' DISCOURSE_SMTP_ADDRESS: smtp.sparkpostmail.com DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: SMTP_Injection DISCOURSE_SMTP_PASSWORD: (api key)

Yet when I try to complete my Discourse setup by creating an admin account, I do not receive the confirmation email. What’s going on here? I have read the email support thread.

Thanks!

Hi @tdsteve - I came across this on the Twitterverse today and whipped up this article for configuring Discourse to use SparkPost - https://support.sparkpost.com/customer/portal/articles/2340644-using-sparkpost-with-discourse.

Feel free to reach out to us on Twitter (@SparkPostDev) or via our Slack community if you run into any more issues!

8 Likes

I can confirm that the guide by the link above works well.
P.S. After the setup is done, a good idea would be to send a test email to mail-tester.com.

2 Likes

If you are running your Discourse on Google Cloud Platform, you have to set your port to 2525 and not to 587.

Google Cloud Platform doesn’t allow outbound connection to ports 25, 465 and 587.

This applies to any email provider.

Learned this hard way while setting up Ghost blog and going mad for couple of days :slight_smile:

3 Likes