# Using Discourse with SparkPost

**URL:** https://meta.discourse.org/t/using-discourse-with-sparkpost/36175
**Category:** Support
**Tags:** email
**Created:** [November 30, 2015, 10:16pm UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175 "2015-11-30T22:16:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tdsteve](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@tdsteve](https://meta.discourse.org/u/tdsteve)
#### Post date: [November 30, 2015, 10:16pm UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175/1 "2015-11-30T22:16:34Z")

</div>

I can’t get my Discourse installation to work with SparkPost. Let’s say my domain is [example.com](http://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!

---

<div class="post-metadata">

### Author: ![richleland](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richleland/32/121850_2.png) [@richleland](https://meta.discourse.org/u/richleland)
#### Post date: [February 25, 2016, 11:21pm UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175/2 "2016-02-25T23:21:59Z")

</div>

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](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](http://slack.sparkpost.com) if you run into any more issues!

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [April 10, 2016, 3:52am UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175/3 "2016-04-10T03:52:40Z")

</div>

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](http://mail-tester.com).

---

<div class="post-metadata">

### Author: ![ernest](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ernest/32/95730_2.png) [@ernest](https://meta.discourse.org/u/ernest)
#### Post date: [May 2, 2018, 7:32am UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175/4 "2018-05-02T07:32:10Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 10, 2020, 10:11am UTC](https://meta.discourse.org/t/using-discourse-with-sparkpost/36175/5 "2020-10-10T10:11:26Z")

</div>


