# Email doesn't work after fresh install

**URL:** https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875
**Category:** Self-hosting
**Tags:** docker, email
**Created:** [October 24, 2015, 11:44pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875 "2015-10-24T23:44:07Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Sunday\_T](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sunday\_T](https://meta.discourse.org/u/Sunday_T)
#### Post date: [October 24, 2015, 11:44pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/1 "2015-10-24T23:44:07Z")

</div>

I have 2 Digitalocean droplets.

1. contains: `dummydomain.com`
2. contains: `sub.dummydomain.com`

I verified both domains with my email provider. My app running on [domain.com](http://domain.com) sends email as expected however, discourse app that is in [sub.domain.com](http://sub.domain.com) doesn’t send any email and i cannot see any useful log info about email failure.

When I try to send test email I get; **There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again.**

My mail settings are:

```
  DISCOURSE_SMTP_ADDRESS: smtp.zoho.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: xx@.dummydomain.com
  DISCOURSE_SMTP_PASSWORD: xxdummypassword
  DISCOURSE_SMTP_ENABLE_START_TLS: true
  DISCOURSE_SMTP_AUTHENTICATION: "login"

```

I have tried everthing I have seen in this community, DO community and Stackoverflow. Even from the answers to the questions I asked there about this issue. Feeling frustrated now and wonder if it will ever work.

I decided to manually set up the admin through terminal, however, I cannot set any kind of email including user sign up, test email or anything else in discourse.

Any clue that could help?

Thanks

---

<div class="post-metadata">

### Author: ![Sunday\_T](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sunday\_T](https://meta.discourse.org/u/Sunday_T)
#### Post date: [October 28, 2015, 5:43am UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/2 "2015-10-28T05:43:39Z")

</div>

I fixed it by setting the email in the database itself using the rails console

```
rails r "SiteSetting.notification_email = 'email@here.com'"

```

---

<div class="post-metadata">

### Author: ![ajoythomas](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@ajoythomas](https://meta.discourse.org/u/ajoythomas)
#### Post date: [December 18, 2015, 6:04pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/3 "2015-12-18T18:04:36Z")

</div>

OMG!! Thank you sooo much for this! I think I installed (the 30 minute version) at least 25 times, tried every trick in the book to solve this email issue… not to mention any small change in the setting requires a rebuild. As much I love the interface and the UX and what not, boy o boy the installation is anything but a straightforward process. That one line of rails code solved my problem as well. So thanks for sharing that! 3 days of googling, going through this forum finally concludes!

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 5:28pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/4 "2016-01-29T17:28:23Z")

</div>

Kindly help! How to open rails console??? 🙂

---

<div class="post-metadata">

### Author: ![Sunday\_T](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sunday\_T](https://meta.discourse.org/u/Sunday_T)
#### Post date: [January 29, 2016, 5:49pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/5 "2016-01-29T17:49:01Z")

</div>

Open rails console for discource by this command ./launcher enter app

int the console do the following,

rails c

rails r “SiteSetting.notification\_email = ‘email@here.com’”

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 5:53pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/6 "2016-01-29T17:53:57Z")

</div>

Thank you so much for your quick reply! \<3 I’ll just try that now!!! 🙂 Hope this works! You’re a live saver!

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 5:57pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/7 "2016-01-29T17:57:36Z")

</div>

Do we have to use the double quotes? Like below

rails r “SiteSetting.notification\_email = ‘email@here.com’”

OR like

rails r SiteSetting.notification\_email = ‘email@here.com’

---

<div class="post-metadata">

### Author: ![Sunday\_T](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sunday\_T](https://meta.discourse.org/u/Sunday_T)
#### Post date: [January 29, 2016, 5:59pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/8 "2016-01-29T17:59:03Z")

</div>

like this. rails r "SiteSetting.notification\_email = ‘email@here.com’ "

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 5:59pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/9 "2016-01-29T17:59:38Z")

</div>

OKEH 😌 Thank you so much!

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 6:01pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/10 "2016-01-29T18:01:11Z")

</div>

Brother it gives this error that method R was not found…

Any idea? Would be really great ful!

---

<div class="post-metadata">

### Author: ![Sunday\_T](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sunday\_T](https://meta.discourse.org/u/Sunday_T)
#### Post date: [January 29, 2016, 6:13pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/11 "2016-01-29T18:13:45Z")

</div>

are you using the docker standalone installation?

---

<div class="post-metadata">

### Author: ![hass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hass/32/122006_2.png) [@hass](https://meta.discourse.org/u/hass)
#### Post date: [January 29, 2016, 6:15pm UTC](https://meta.discourse.org/t/email-doesnt-work-after-fresh-install/34875/12 "2016-01-29T18:15:12Z")

</div>

Brother I followed this default guide and installed it manually. [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

I have currently disabled emails.
