#  Help, do not send the email

**URL:** https://meta.discourse.org/t/help-do-not-send-the-email/82515
**Category:** Self-hosting
**Created:** [March 8, 2018, 1:09pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515 "2018-03-08T13:09:50Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Mecanicos\_Argentinos](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mecanicos\_Argentinos](https://meta.discourse.org/u/Mecanicos_Argentinos)
#### Post date: [March 8, 2018, 1:09pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/1 "2018-03-08T13:09:51Z")

</div>

Hello friends, good day.

First, I want to clarify that I do not speak or write English. I speak and write Spanish. That’s why I’m using Google Translate. Please accept my apologies.

My experience is with shared hosting and using Gmail for emails; that is, I have no experience with this type of system.

My problem is that I cannot install the system. It is impossible to send the activation email.

Here are the steps and actions I have taken:

1 - I contracted the Digital Ocean service with the Discourse application pre-installed.  
2 - Activated the domain.  
3 - Configured Mailgun, creating subdomains to handle email.

Now, I will try to explain step by step what I did:

1 - I obtained a Droplet on DigitalOcean with Ubuntu and Discourse pre-installed.

2 - The domain is configured with its respective DNS records provided by DigitalOcean.

3 - In Mailgun, I created the domain and two subdomains. In the Discourse installation, I only use a single subdomain.

4 - Mailgun configuration was completed using the DNS settings in DigitalOcean.

5 - Each subdomain and domain is correctly active, according to Mailgun.

 ![Captura](https://global.discourse-cdn.com/meta/original/3X/b/8/b8986362406fc9187df77bc30d864371370bb235.PNG)

6 - According to the guide on GitHub and the Discourse installation process:

```
* Hostname for your Discourse? [discourse.example.com]:
      * ---- At this point, can you use the root domain?
 * Email address for admin account(s)? [me@example.com, you@example.com]:
       * ----- In this section, I entered my email address, in this case, a Gmail address.

```

- SMTP server address? [[smtp.example.com](http://smtp.example.com)]:  
SMTP port? [587]:  
SMTP user name? [user@example.com]:  
SMTP password? [pa$$word]:  
Let’s Encrypt account email? (ENTER to skip) [me@example.com]:

- ------ In these steps, the data provided by Mailgun should be entered.

Here is the actual configuration:

DISCOURSE\_HOSTNAME: ‘[discourse.mecanicosargentinos.com](http://discourse.mecanicosargentinos.com)’

DISCOURSE\_DEVELOPER\_EMAILS: ‘xxxxxxxxx@gmail.com’

DISCOURSE\_SMTP\_ADDRESS: [smtp.mailgun.org](http://smtp.mailgun.org) # required  
DISCOURSE\_SMTP\_PORT: 587 # (optional, default 587)  
DISCOURSE\_SMTP\_USER\_NAME: [postmaster@discourse.mecanicosargentinos.com](mailto:postmaster@discourse.mecanicosargentinos.com) # required  
DISCOURSE\_SMTP\_PASSWORD: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # required, WARNING: the character ‘#’ in the password can cause problems!  
#DISCOURSE\_SMTP\_ENABLE\_START\_TLS: true # (optional, default true)

Below is a log from a subdomain; keep in mind that the attempts are from Outlook.

 ![Captura1](https://global.discourse-cdn.com/meta/original/3X/7/8/789ab9b250e0d8762aa00c3ff703778a320a8dab.PNG)

7 - Following this guide:  
[https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/2](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/2)

If I run this command:

telnet [smtp.mailgun.org](http://smtp.mailgun.org) 587

I get this result:

 ![Captura2](https://global.discourse-cdn.com/meta/original/3X/2/2/2223a9ddd166515f0b01bb0aedfd5c68ae8254c7.PNG)

I must be doing something wrong. Can you help me? Thank you so much!!!

---

<div class="post-metadata">

### Author: ![ankur1857](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ankur1857/32/91555_2.png) [@ankur1857](https://meta.discourse.org/u/ankur1857)
#### Post date: [March 8, 2018, 1:23pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/2 "2018-03-08T13:23:41Z")

</div>

You have bounce rate 25% in your mailgun. It stops sending mail if bounce rate is above 5%. Contact mailgun support.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 8, 2018, 1:28pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/3 "2018-03-08T13:28:36Z")

</div>

You might also try using port 2525. Digital ocean sometimes silently filters outgoing smtp traffic. I always often on port 2525.

---

<div class="post-metadata">

### Author: ![Mecanicos\_Argentinos](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mecanicos\_Argentinos](https://meta.discourse.org/u/Mecanicos_Argentinos)
#### Post date: [March 8, 2018, 1:32pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/4 "2018-03-08T13:32:38Z")

</div>

@pfaffman You say open port 2525, it has nothing to do with port 587 where SMTP works? Sorry if it’s a very basic question.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 8, 2018, 1:36pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/5 "2018-03-08T13:36:10Z")

</div>

Digital ocean sometimes filters outgoing smtp traffic.that method your server from being able to send spam (or any mail). Mailgun allows incoming mail to port 2525 to get around this.

Change 587 to 2525 in your discourse settings.

---

<div class="post-metadata">

### Author: ![ankur1857](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ankur1857/32/91555_2.png) [@ankur1857](https://meta.discourse.org/u/ankur1857)
#### Post date: [March 8, 2018, 1:38pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/6 "2018-03-08T13:38:03Z")

</div>

SMTP PORT 587 works ok with mailgun, no need to change it.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 8, 2018, 1:42pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/7 "2018-03-08T13:42:57Z")

</div>

It’s not mailgun that’s the issue. This server can’t connect to port 587 to any computer in the world. There could be some other problem, but I’m pretty sure this week fix it.

A test would be to see if you can telnet to a Gmail smtp server and have it also time out.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 8, 2018, 2:19pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/8 "2018-03-08T14:19:04Z")

</div>

There’s one of two problems here:

1. mailgun is dropping your incoming connection attempts to their port 587 (we don’t know if they ever do this)
2. Digital Ocean is dropping your outgoing connections to port 587 (we KNOW this happens)

Given that we know that that (2) actually happens, it’s reasonable to assume it’s happening in this case and there are two ways to solve it:

1. Contact Digital Ocean and ask them to remove the outbound port 587 block
2. Switch to using port 2525 as @pfaffman suggests - Mailgun accepts mail on port 2525 for exactly this reason.

---

<div class="post-metadata">

### Author: ![Mecanicos\_Argentinos](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mecanicos\_Argentinos](https://meta.discourse.org/u/Mecanicos_Argentinos)
#### Post date: [March 8, 2018, 2:23pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/9 "2018-03-08T14:23:03Z")

</div>

![Captura3](https://global.discourse-cdn.com/meta/original/3X/f/c/fc83cd8bde9bca74f90bc7e76defc58973acb0a3.PNG)

---

<div class="post-metadata">

### Author: ![ankur1857](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ankur1857/32/91555_2.png) [@ankur1857](https://meta.discourse.org/u/ankur1857)
#### Post date: [March 8, 2018, 2:35pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/10 "2018-03-08T14:35:31Z")

</div>

What is skip reason at `/admin/email/skipped`

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [March 8, 2018, 2:41pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/11 "2018-03-08T14:41:58Z")

</div>

Not 25, but 2525.

@ankur he can’t even connect to the mailserver

---

<div class="post-metadata">

### Author: ![Mecanicos\_Argentinos](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mecanicos\_Argentinos](https://meta.discourse.org/u/Mecanicos_Argentinos)
#### Post date: [March 8, 2018, 3:41pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/12 "2018-03-08T15:41:33Z")

</div>

Should this be working? Ehído the installation again and does not send anything. Will it be that I have to perform an installation from scratch? and not doing ./launcher Rebuild App

 ![Captura4](https://global.discourse-cdn.com/meta/original/3X/9/5/95774bf1c437dd14e5a1382f084b8e7ae75042c2.PNG) ![Captura5](https://global.discourse-cdn.com/meta/original/3X/a/f/af1e7c08a18da607c53e90a5637b6395542aef28.PNG)

---

<div class="post-metadata">

### Author: ![Mecanicos\_Argentinos](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mecanicos\_Argentinos](https://meta.discourse.org/u/Mecanicos_Argentinos)
#### Post date: [March 8, 2018, 3:44pm UTC](https://meta.discourse.org/t/help-do-not-send-the-email/82515/13 "2018-03-08T15:44:37Z")

</div>

I was lucky, I only had to forward the email, it does not always work in the port by default. It worked for me with port 2525.  
Great community, thank you very much! I am very grateful!
