# How to set up the SMTP settings?

**URL:** https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507
**Category:** Support
**Created:** [February 4, 2025, 8:53pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507 "2025-02-04T20:53:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jill88](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jill88/32/486503_2.png) [@jill88](https://meta.discourse.org/u/jill88)
#### Post date: [February 4, 2025, 8:53pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/1 "2025-02-04T20:53:41Z")

</div>

I am having a hard time setting up the smtp settings to send emails. I tried using this article for help:  
troubleshoot-email-on-a-new-discourse-install/16326  
(sorry i can’t post the link)  
But still can’t figure it out. Here is my setup.  
I have a domain, [domain1.com](http://domain1.com). Discourse is running on a subdomain (cname):  
`hub.domain1.com`  
I have a separate email service at [domain2.com](http://domain2.com), and it’s smtp address is:  
`mail.domain2.com`  
All the email setup is fine as far as dkim spf etc. I can use that email no problem.

I am using the official normal setup instructions for discourse, but I can’t use the setup script because i don’t have port 80 and 443 available. There is a reverse proxy routing everything, including this subdomain. SO I have to manually adjust the app.yml file and do the rebuild script. No problem. I just can’t get emails to work.  
If you can just advise on the email settings, that would help thanks. This is what I have

```plaintext
DISCOURSE_DEVELOPER_EMAILS: 'admin@domain2.com'
DISCOURSE_SMTP_ADDRESS: mail.domain2.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: admin@domain2.com
DISCOURSE_SMTP_PASSWORD: somepassword

```

---

<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: [February 4, 2025, 9:02pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/2 "2025-02-04T21:02:29Z")

</div>

> [@jill88](#):
>
> If you can just advise on the email settings

Nobody here can tell you what your mail settings are because we don’t administer your mail server.

What port do you need to submit mail on? If it’s the default (25) you can leave it blank.

Does it require authentication? If so, put in the required credentials. If not, leave them blank.

---

<div class="post-metadata">

### Author: ![qingfeng1024](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qingfeng1024/32/495412_2.png) [@qingfeng1024](https://meta.discourse.org/u/qingfeng1024)
#### Post date: [February 4, 2025, 9:09pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/3 "2025-02-04T21:09:27Z")

</div>

If you don’t know how to set up your own SMTP email server, I strongly recommend using an existing SMTP service. This is especially true for a community just starting out, as it saves a significant amount of time and money.

> [@How to set up Feishu's free SMTP service for your Discourse community](https://meta.discourse.org/t/how-to-set-up-feishus-free-smtp-service-for-your-discourse-community/348139):
>
> I was asked how to use an SMTP mail server, so I thought I’d share this recommendation for beginners. No ads, just helpful information! Feishu (Lark) is a Chinese company that provides enterprises with a one-stop solution for workflow and work platforms. However, anyone can create an account and use its free services. Feishu offers SMTP services to free users, with a daily sending limit of 450 emails, amounting to nearly 15,000 free emails per month. For a growing Discourse community administr…

---

<div class="post-metadata">

### Author: ![jill88](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jill88/32/486503_2.png) [@jill88](https://meta.discourse.org/u/jill88)
#### Post date: [February 4, 2025, 10:05pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/4 "2025-02-04T22:05:56Z")

</div>

I already have my own email server (or rather a service I am using with another hoster, not the one I am hosting this on), and I am using the same settings that works on all other services I have tried. I just can’t get it to work on this one. I think I am not setting up these parameters correctly.

---

<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: [February 4, 2025, 10:14pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/5 "2025-02-04T22:14:17Z")

</div>

Take Discourse out of the equation.

Does connecting to the mail server work from the server itself?

---

<div class="post-metadata">

### Author: ![jill88](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jill88/32/486503_2.png) [@jill88](https://meta.discourse.org/u/jill88)
#### Post date: [February 5, 2025, 10:28pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/6 "2025-02-05T22:28:15Z")

</div>

You are correct. My provider has blocked smtp ports, so I have asked to open it. However, I also have it on a local server where it is not blocked, and I am still unable to get the emails working. Please give me a couple days, let me make sure it is not on my end.

---

<div class="post-metadata">

### Author: ![jill88](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jill88/32/486503_2.png) [@jill88](https://meta.discourse.org/u/jill88)
#### Post date: [February 6, 2025, 8:00pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/7 "2025-02-06T20:00:51Z")

</div>

The provider had indeed blocked the ports. They are unblocked now and the emails are working with the default settings. Thank you.

---

<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: [March 8, 2025, 8:01pm UTC](https://meta.discourse.org/t/how-to-set-up-the-smtp-settings/350507/8 "2025-03-08T20:01:36Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
