# How setup email

**URL:** <https://forum.ghost.org/t/how-setup-email/45470>\
**Category:** Developer help\
**Created:** [March 5, 2024, 4:01pm UTC](https://forum.ghost.org/t/how-setup-email/45470 "2024-03-05T16:01:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 5, 2024, 4:01pm UTC](https://forum.ghost.org/t/how-setup-email/45470/1 "2024-03-05T16:01:04Z")

</div>

Hi dear community,

I have 2 tasks with my email.

1. I need to connect Mailgun and Ghost to provide notifications and other stuff. I do everything regarding this article: [Configuration - Adapt your publication to suit your needs](https://ghost.org/docs/config/?_ga=2.188976300.626926321.1709465214-1747738143.1707835332#mail)  
I’ve did steps on Mailgun side without any problems. Also here is a screenshot of my json config  
 ![mailproblem](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/3/f/3fa6a0b6b3014a9fdb7752acc9e62c12fb4cf51d.png)

But when i try to subscribe to my site, i see an error

 ![mailproblem2](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/5/2/521cb555407dec781151f8bcb4f8b8cdbc1ae0bc.png)

I thought the problem is in empty form here, in admin panel of the Ghost (because in official Ghost guide there is no any info about this step).  
I’ve added API key key (from Mailgun) and Mailgun domain, but still no progress.

 ![изображение_2024-03-05_175901581](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/8/e/8e1c7deb87514128670739352147e9bc52828530.png)

Questions:

1. Maybe the source of problem is in my Digital Ocean email setup? I did nothing at this side. Should i create at hosting some email entity?

2. Is it possible to use at the same time Mailgun and Gmail? As far as i need Mailgun only for sending notifications and Gmail - to read users letters and reply them. But i’ve heard it’s not very good to use them at once.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [March 5, 2024, 4:09pm UTC](https://forum.ghost.org/t/how-setup-email/45470/2 "2024-03-05T16:09:55Z")

</div>

Before we troubleshoot further: You /did/ restart Ghost after changing the config.json file, right? 🙂 If you didn’t, please go do that first.

The mailgun settings you snapshotted above (from the Ghost settings) are for newsletter sending. They don’t impact transactional email, which includes sending magic links (what you’re trying to do here).

Ghost is not going to receive email for you and let you read it. You don’t set up your inbound email with Ghost. (That seems to be what you’re asking in #2?)

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 5, 2024, 8:48pm UTC](https://forum.ghost.org/t/how-setup-email/45470/3 "2024-03-05T20:48:28Z")

</div>

Right you are, i’ve made restart yet.

Finally, i can mark 3 tasks and their possible solutions.

1. Setup the transactional emails. As i understood, it’s necessary to replace my current config.production.json file with another parameters?
2. Setup notification emails. Just keep the current piece of code in config.production.json?
3. I’ve got that Ghost is not connected with regular email service like Gmail, Outlook etc. Just wanted to doublecheck about possible conflicts because of using Mailgun and other services. Ok, sorry, this question i have to solve on my own.

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 6, 2024, 3:54pm UTC](https://forum.ghost.org/t/how-setup-email/45470/4 "2024-03-06T15:54:51Z")

</div>

I’ve even purchased $35 per month plan because there were different issues in other topics because of free version. ([Subscribe Failed to send magic link email Error](https://forum.ghost.org/t/subscribe-failed-to-send-magic-link-email-error/34672))

Also i changed the port… But nothing helped. Can you please check my preferences once again as i modified’em?

 ![mailproblem4](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/3/6/360206d31e27c4edf2e28661a2e3d51237d25520.png)

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [March 6, 2024, 6:20pm UTC](https://forum.ghost.org/t/how-setup-email/45470/5 "2024-03-06T18:20:46Z")

</div>

Try running the swaks tool - search the forum for details.

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 13, 2024, 2:24pm UTC](https://forum.ghost.org/t/how-setup-email/45470/6 "2024-03-13T14:24:49Z")

</div>

Hello, community!  
I’ve tried swak tools and found out the problem in a connection timeout.  
How can i solve this problem?

 ![swakerr](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/b/9/b9a4e1a7381e43eb86e10cf8af8d0aef9c08abdf.png)

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 13, 2024, 2:32pm UTC](https://forum.ghost.org/t/how-setup-email/45470/7 "2024-03-13T14:32:09Z")

</div>

And here my updated setup file

 ![ghostemailperf](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/9/5/95ce4c5d20415910c3c9e37960b2f4c5e0dff3ff.png)

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 13, 2024, 3:23pm UTC](https://forum.ghost.org/t/how-setup-email/45470/8 "2024-03-13T15:23:31Z")

</div>

Uffff, i’ve found a solution (changed port from 465 to 587).  
Now users can login/register at the site and get confirmation emails.  
The only problem left - when user open confirmation email, he get warning about insecure connection.

Should i fix it with a string:  
“secure”: true, instead of  
“secure”: false,  
in config.production.json?

Do i need something else?

 ![photo_2024-03-13_17-19-26](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/d/b/dbf2a3c9423beb774152075ba1fe6df2a24ca0ff.jpeg)

UPD  
The same problem (warning about suspicious connection after user clicks confirmation link) appears in both situations:  
A) 465 port, secured connection, no TLS  
B) 587 port, no secured connection, switched on TLS

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [March 13, 2024, 4:07pm UTC](https://forum.ghost.org/t/how-setup-email/45470/9 "2024-03-13T16:07:26Z")

</div>

I don’t read Russian and I can’t Google Translate an image, but the error message seems to say that this is an ssl problem with [email.traktatiki.com](http://email.traktatiki.com). Do you have DNS set up correctly for that domain?

There are directions (although for Ghost Pro) here:

> **[Custom sending domains](https://ghost.org/help/custom-sending-domains/)**
>
> Customize the from-address of your emails by configuring a custom sending domain for newsletters sent from your publication.

I /suspect/ that you’re not set up correctly in Mailgun, such that it isn’t serving up an SSL certificate for email.yourdomain.tld.

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 13, 2024, 4:19pm UTC](https://forum.ghost.org/t/how-setup-email/45470/10 "2024-03-13T16:19:12Z")

</div>

I will check, thanks. It really looks like subdomain doesn’t have ssl certificates

 ![Screenshot_20240313_181801_Google](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/8/4/8492bba336a4080235d3a8ffeef34f9559fa066e.jpeg)

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [March 13, 2024, 4:24pm UTC](https://forum.ghost.org/t/how-setup-email/45470/11 "2024-03-13T16:24:53Z")

</div>

That domain should be set up as a cname for mailgun, so mailgun would provide the ssl for it.

---

<div class="post-metadata">

**Author:** ![Qtuzka](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/qtuzka/32/29255_2.png) [@Qtuzka](https://forum.ghost.org/u/Qtuzka)\
**Post date:** [March 14, 2024, 12:52pm UTC](https://forum.ghost.org/t/how-setup-email/45470/12 "2024-03-14T12:52:08Z")

</div>

Thank you!

I found a solution!  
I just need to change tracking protocol from http to https in Mailgun settings.  
We can close the ticket now
