# Problem with SMTP configuration

**URL:** https://meta.discourse.org/t/problem-with-smtp-configuration/65892
**Category:** Self-hosting
**Created:** [July 9, 2017, 3:01pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892 "2017-07-09T15:01:56Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Pawel\_Kosiorek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawel_kosiorek/32/75785_2.png) [@Pawel\_Kosiorek](https://meta.discourse.org/u/Pawel_Kosiorek)
#### Post date: [July 9, 2017, 3:01pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/1 "2017-07-09T15:01:56Z")

</div>

Hi!  
I went through most of the “SMTP problems” threads but still cannot solve my problem.  
Ubuntu in AWS EC2, fresh Discourse installation, can’t receive confirmation email.  
Current configuration:

```
DISCOURSE_SMTP_ADDRESS: smtp.motomirko.pl
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: admin@motomirko.pl
DISCOURSE_SMTP_PASSWORD: secretplainpassword
DISCOURSE_SMTP_ENABLE_START_TLS: true

```

I can telnet to smtp.motomirko.pl 465 from instance, connection is ok.  
I test my mail server with setting outlook client, and there I saw the problem. When connection was set only to TLS than it was refused, when I set to SSL than connection was successful.  
I’m not really sure is it helpful.  
Dump from logs : [Started POST "/finish-installation/register" for 87.206.151.152 at 2017-07-09 14 - Pastebin.com](https://pastebin.com/jD4ftdrt)

Please help!  
Cheers!

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [July 9, 2017, 10:24pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/2 "2017-07-09T22:24:31Z")

</div>

Port 465 was, many years ago, SMTP over SSL/TLS – it doesn’t use STARTTLS. I say “was”, because it’s been deprecated for so many years that the IETF has deregistered smtps as a protocol. You should use either port 25 (SMTP) or port 587 (submission) and STARTTLS.

---

<div class="post-metadata">

### Author: ![Pawel\_Kosiorek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawel_kosiorek/32/75785_2.png) [@Pawel\_Kosiorek](https://meta.discourse.org/u/Pawel_Kosiorek)
#### Post date: [July 10, 2017, 6:27am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/3 "2017-07-10T06:27:02Z")

</div>

Yeah, you’re absolutely right, I moved from my old provier to gmail, and now everything works like a charm! Thanks!

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [July 10, 2017, 6:41am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/4 "2017-07-10T06:41:52Z")

</div>

Gmail is not recommended as it has limits for outbound mail. Check out MailGun - it is very straight forward to setup.

---

<div class="post-metadata">

### Author: ![Nelson](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@Nelson](https://meta.discourse.org/u/Nelson)
#### Post date: [July 20, 2017, 8:39pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/5 "2017-07-20T20:39:05Z")

</div>

I hope it’s ok to bump instead of creating a new topic. My host only has smtps (465/ssl) available and I can’t seem to get it to work.

```
  DISCOURSE_SMTP_ADDRESS: mail.myprovider.com
  DISCOURSE_SMTP_PORT: 465 # smtps/ssl
# DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: login@mydomain.com
  DISCOURSE_SMTP_PASSWORD: "PASSWORD"
  DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)

```

These settings work in Thunderbird. Is smtps not supported or am I doing something wrong? Maybe I need to connect to `mail.mydomain.com` where a valid ssl cert is installed?

---

<div class="post-metadata">

### Author: ![Pawel\_Kosiorek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawel_kosiorek/32/75785_2.png) [@Pawel\_Kosiorek](https://meta.discourse.org/u/Pawel_Kosiorek)
#### Post date: [July 20, 2017, 9:20pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/6 "2017-07-20T21:20:08Z")

</div>

So my solution was first to switch to Gmail, but when google started making me problems (limits…) than i switched to MailGun like @ljpp suggested (thanks man it’s great!). I think that’s not possible to force discourse to use 465 anymore.

---

<div class="post-metadata">

### Author: ![Nelson](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@Nelson](https://meta.discourse.org/u/Nelson)
#### Post date: [July 20, 2017, 10:12pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/7 "2017-07-20T22:12:40Z")

</div>

Thank you. I’ve signed up for SparkPost as I don’t want to change hosts for my mail. They give you 100 mails per day without verifying your mail, 500 if you do and 10.000 if you add your credit card details. Not too bad.

---

<div class="post-metadata">

### Author: ![djr013](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@djr013](https://meta.discourse.org/u/djr013)
#### Post date: [September 29, 2019, 5:46am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/8 "2019-09-29T05:46:51Z")

</div>

> [@mpalmer](#):
>
> Port 465 was, many years ago, SMTP over SSL/TLS – it doesn’t use STARTTLS. I say “was”, because it’s been deprecated for so many years that the IETF has deregistered smtps as a protocol. You should use either port 25 (SMTP) or port 587 (submission) and STARTTLS.

There’s a January 2018 IETF RFC which recommends use of port 465 for “implicit” TLS. A motivation for this is the increasing trend for mandatory encryption, which renders STARTTLS somewhat redundant. [RFC 8314 - Cleartext Considered Obsolete: Use of Transport Layer Security (TLS) for Email Submission and Access](https://tools.ietf.org/html/rfc8314)

---

<div class="post-metadata">

### Author: ![sharkdeng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sharkdeng/32/184854_2.png) [@sharkdeng](https://meta.discourse.org/u/sharkdeng)
#### Post date: [June 1, 2020, 10:09am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/9 "2020-06-01T10:09:23Z")

</div>

Hello, I got problem to set up discourse smpt

I installed the discourse bitnami image on AWS EC2,

I followed this instruction and these checklists but no charm happens. Any idea? Thank you very much!

**instruction**  
[https://docs.bitnami.com/bch/apps/discourse/configuration/configure-smtp/](https://docs.bitnami.com/bch/apps/discourse/configuration/configure-smtp/)

**checklists**

> **[Use Amazon Simple Email Service (SES)](https://docs.bitnami.com/aws/how-to/use-ses/)**

> **[Troubleshoot SMTP Issues](https://docs.bitnami.com/general/how-to/troubleshoot-smtp-issues/)**

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [June 1, 2020, 10:10am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/10 "2020-06-01T10:10:47Z")

</div>

Bitnami isn’t officially supported, please contact bitnami directly for support.

---

<div class="post-metadata">

### Author: ![sharkdeng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sharkdeng/32/184854_2.png) [@sharkdeng](https://meta.discourse.org/u/sharkdeng)
#### Post date: [June 1, 2020, 10:16am UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/11 "2020-06-01T10:16:08Z")

</div>

ok, thanks for letting me know.

---

<div class="post-metadata">

### Author: ![vtulin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vtulin/32/226337_2.png) [@vtulin](https://meta.discourse.org/u/vtulin)
#### Post date: [July 2, 2021, 3:09pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/12 "2021-07-02T15:09:38Z")

</div>

Still can’t get it work. 465 port - timeout, 587, 25, 2525 - email should be encrypted with SSL or TLS. I was trying any possible combinations with these public mail services:

- [yandex.ru](http://yandex.ru)
- [mail.ru](http://mail.ru)

---

<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: [October 28, 2021, 10:51pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/13 "2021-10-28T22:51:47Z")

</div>

Did you get it to work?

---

<div class="post-metadata">

### Author: ![vtulin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vtulin/32/226337_2.png) [@vtulin](https://meta.discourse.org/u/vtulin)
#### Post date: [February 9, 2022, 8:26pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/14 "2022-02-09T20:26:42Z")

</div>

Finally I made it work, the problem with Yandex was `DISCOURSE_NOTIFICATION_EMAIL` should be same as `DISCOURSE_SMTP_USER_NAME`

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 8, 2023, 6:06pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/15 "2023-10-08T18:06:17Z")

</div>

A post was split to a new topic: [Issues setting up hostmail](https://meta.discourse.org/t/issues-setting-up-hostmail/281533)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 8, 2023, 6:06pm UTC](https://meta.discourse.org/t/problem-with-smtp-configuration/65892/16 "2023-10-08T18:06:31Z")

</div>


