# Email not sending out after installation. I need help please

**URL:** https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211
**Category:** Self-hosting
**Created:** [10 בפברואר,‏ 2017,‏ 3:11pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211 "2017-02-10T15:11:34Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 3:11pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/1 "2017-02-10T15:11:34Z")

</div>

I think I have just reached my highest level of frustration with configuring mailgun ☹. Please I need help.

This is my problem:

I installed discourse successfully after several failed attempt with configuring smtp credentials and the problem I seem to have is sending activation links to new registered users for activation of their account. I tested with my other gmail account and I did not get any email as regards link to activating my new account. I also tried inviting my friends as moderators but that too did not work!

I then checked my mailgun account to see my logs and I saw this:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/0/80c7fcdf13c43d8621f866f9f082910fe8b4f34d.PNG)

I do not understand what that means.

My DNS are configured well

:

 ![](https://global.discourse-cdn.com/meta/original/3X/6/6/66de4011f4fa4fea7ae7eb27bb0d040cd880587b.PNG)

Images of my admin interface:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/9/e923359207fb7f7435cff6131184083965533468.PNG) ![](https://global.discourse-cdn.com/meta/original/3X/c/1/c1a8dca2b3fc8e5eeab73855ca7f199d9ec7a40e.PNG) ![](https://global.discourse-cdn.com/meta/original/3X/8/7/8773ca8477eaacef59abae5315a8db3c3a9907f5.PNG)

Did I do anything wrong?

Please I really need help. Thanks

---

<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: [10 בפברואר,‏ 2017,‏ 3:32pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/2 "2017-02-10T15:32:54Z")

</div>

Mailgun now requires a credit card number to deliver mail. If you give them a credit card number, it’ll work.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [10 בפברואר,‏ 2017,‏ 4:57pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/3 "2017-02-10T16:57:56Z")

</div>

Ahh. a very helpful, very timely tip actually. Thanks! 🚀

I don’t know what happened there for me but my mailgun account was indeed still sending out emails. I guess I am grandfathered in with an older account or something.

But without providing a credit card I didn’t have access to the mail log which is crucial for me.

What’s a bit weird about this arrangement is that it’s still free but if you send more thank 10k you start getting billed. So pretty important to also set up a custom message limit in your mailgun prefs.

 ![](https://global.discourse-cdn.com/meta/original/3X/e/4/e49dbabc10b461fe6c4a9970de67d56a66456786.png)

---

<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: [10 בפברואר,‏ 2017,‏ 4:59pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/4 "2017-02-10T16:59:19Z")

</div>

I think the policy changed for new accounts in January.

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 6:50pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/5 "2017-02-10T18:50:26Z")

</div>

> [@pfaffman](#):
>
> I think the policy changed for new accounts in January.

Wow. So if I add my credit card, will I still be charged if I don’t send up to 10,000 a month?

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [10 בפברואר,‏ 2017,‏ 6:52pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/6 "2017-02-10T18:52:51Z")

</div>

Per Mailgun dashboard, “You won’t be charged until you surpass your free allocation”

---

<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: [10 בפברואר,‏ 2017,‏ 6:53pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/7 "2017-02-10T18:53:00Z")

</div>

Right. It’s always made sense to give them a credit card anyway, as they turn more stuff on if you do. IMHO, it’s sort of crazy that they every delivered mail for free without any proof of ability to pay. You can see their [pricing page](http://www.mailgun.com/pricing) for more info.

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 6:54pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/8 "2017-02-10T18:54:28Z")

</div>

Ok guys. I will go ahead and add my credit card.

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 7:22pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/9 "2017-02-10T19:22:56Z")

</div>

It’s working now 😀. But I have another issue now 😑 The link to activate the account does not go to the homepage of the forum. Instead it takes me to this link: [http://email.rookiecave.com](http://email.rookiecave.com)

 ![](https://global.discourse-cdn.com/meta/original/3X/a/a/aaa8458d46939e2d995684fb0f568c122509e152.PNG)

Any thought on this? Thanks

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [10 בפברואר,‏ 2017,‏ 7:31pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/10 "2017-02-10T19:31:58Z")

</div>

What’s your `DISCOURSE_HOSTNAME` in your app.yml?

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 7:36pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/11 "2017-02-10T19:36:25Z")

</div>

My discourse hostname is [www.rookiecave.com](http://www.rookiecave.com)

---

<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: [10 בפברואר,‏ 2017,‏ 7:43pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/12 "2017-02-10T19:43:27Z")

</div>

Perhaps you changed it after you did the initial build? You probably need to

```plaintext
cd /var/discourse
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 8:19pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/13 "2017-02-10T20:19:37Z")

</div>

It’s working now. I realized the problem was from my mailgun domain settings. My tracking hostname was ‘email’, it was coming as a prefix to the domain name. All I had to do was turn it off.

Thanks

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 8:20pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/14 "2017-02-10T20:20:51Z")

</div>

Now I need to install ssl certificate on my domain name using let’s encrypt. How do I go about that? Any guide?

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [10 בפברואר,‏ 2017,‏ 8:44pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/15 "2017-02-10T20:44:34Z")

</div>

The guide you’re looking for is here:

> [@Set up HTTPS support with Let's Encrypt](https://meta.discourse.org/t/setting-up-lets-encrypt/40709):
>
> bookmark This is a guide for enabling HTTPS on an existing Discourse installation using Let’s Encrypt. It assumes prior installation without HTTPS enabled. person_raising_hand Required user level: System Administrator exclamation This guide is only for existing installs where HTTPS is not enabled. Following the [official setup guide](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) automatically enables HTTPS by default. So you’d like to add https to your Discourse absolutely free, courtesy of our friends at [Let’s Encrypt?](https://letsencrypt.org/)bell I…

---

<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: [10 בפברואר,‏ 2017,‏ 8:55pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/16 "2017-02-10T20:55:04Z")

</div>

If you’re interested in using Discourse, you might take notice of its search function. search for “encrypt #howto” and you’d find it, as @awole20 did.

---

<div class="post-metadata">

### Author: ![elmurph](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmurph/32/67391_2.png) [@elmurph](https://meta.discourse.org/u/elmurph)
#### Post date: [10 בפברואר,‏ 2017,‏ 9:31pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/17 "2017-02-10T21:31:01Z")

</div>

> [@pfaffman](#):
>
> If you’re interested in using Discourse, you might take notice of its search function. search for “encrypt #howto” and you’d find it, as @awole20 did.

Ok I understand. I have just followed the guide and added this:

templates:

- “templates/web.template.yml”
- “templates/web.ssl.template.yml”
- “templates/web.letsencrypt.ssl.template.yml”

Please how do I rebuild the containers?

Which of the commands are valid for rebuilding?

1../launcher rebuild   
2. ./launcher rebuild start app  
3. ./launcher rebuild app  
4. ./launcher rebuild \<app.yml\>

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [10 בפברואר,‏ 2017,‏ 11:23pm UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/18 "2017-02-10T23:23:46Z")

</div>

Number 3 only.

```plaintext
./launcher {start | stop | bootstrap | destroy | rebuild} [container name]

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [11 בפברואר,‏ 2017,‏ 2:32am UTC](https://meta.discourse.org/t/email-not-sending-out-after-installation-i-need-help-please/57211/19 "2017-02-11T02:32:14Z")

</div>


