# Sending mails using cpanel and smtp

**URL:** https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338
**Category:** Self-hosting
**Created:** [July 8, 2019, 5:38pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338 "2019-07-08T17:38:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Daan\_Seegers](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daan_seegers/32/99611_2.png) [@Daan\_Seegers](https://meta.discourse.org/u/Daan_Seegers)
#### Post date: [July 8, 2019, 5:38pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/1 "2019-07-08T17:38:26Z")

</div>

Hey Guys and girls,

I am still a bit stuck in this. But I cannot connect Discourse to my SMTP (I have tried for a few hours but at the and I have failed to get it working properly).

Firstly, I had a problem that the certificate of the mail server did not match the server. Then I’ve try to send it using an unencrypted port. But I was having the same problem.

Now I have added the right hostname (I think). But I get a `Job exception: Net::ReadTimeout`.  
According to the hostingprovider the IP is not blocked.

[I have looked up the complete tutorial](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

Is there anything else I van try?

---

<div class="post-metadata">

### Author: ![aatishrkamble](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aatishrkamble/32/140103_2.png) [@aatishrkamble](https://meta.discourse.org/u/aatishrkamble)
#### Post date: [July 8, 2019, 5:47pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/2 "2019-07-08T17:47:17Z")

</div>

[Mailgun](https://www.mailgun.com/pricing) has a free plan in which you can send 10,000 emails per month.

---

<div class="post-metadata">

### Author: ![Daan\_Seegers](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daan_seegers/32/99611_2.png) [@Daan\_Seegers](https://meta.discourse.org/u/Daan_Seegers)
#### Post date: [July 8, 2019, 6:07pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/3 "2019-07-08T18:07:10Z")

</div>

I know but we have mail server that Works fine for Sending mails. we never reached spam box and have multiple ip addresses because of that :), the only problem is that I cannot figure out why I cannot connect to the server

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 8, 2019, 6:09pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/4 "2019-07-08T18:09:11Z")

</div>

> [@Daan\_Seegers](#):
>
> According to the hostingprovider the IP is not blocked.

It certainly seems like it’s blocked somehow. Can your server reach the mail server outside of Discourse?

---

<div class="post-metadata">

### Author: ![Daan\_Seegers](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daan_seegers/32/99611_2.png) [@Daan\_Seegers](https://meta.discourse.org/u/Daan_Seegers)
#### Post date: [July 8, 2019, 6:17pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/5 "2019-07-08T18:17:30Z")

</div>

How can I test this? I can connect using my laptop but the server is on a Different location

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 8, 2019, 6:28pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/6 "2019-07-08T18:28:03Z")

</div>

On a command line you can try: `telnet mail port` where `mail` is your mailserver address and `port` is the port number. If it connects and you can type stuff, you are good. If not, you are blocked somehow.

---

<div class="post-metadata">

### Author: ![tomtjes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomtjes/32/131271_2.png) [@tomtjes](https://meta.discourse.org/u/tomtjes)
#### Post date: [July 8, 2019, 6:40pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/7 "2019-07-08T18:40:52Z")

</div>

Don’t use `mail.yourdomain.com` but `server1.hostingprovider.com` instead.

---

<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: [December 12, 2022, 8:30pm UTC](https://meta.discourse.org/t/sending-mails-using-cpanel-and-smtp/122338/8 "2022-12-12T20:30:38Z")

</div>

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