# Can't figure out how to setup email

**URL:** <https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355>\
**Category:** Developer help\
**Created:** [December 3, 2018, 6:34am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355 "2018-12-03T06:34:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AaronMichael](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmichael/32/2891_2.png) [@AaronMichael](https://forum.ghost.org/u/AaronMichael)\
**Post date:** [December 3, 2018, 6:34am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/1 "2018-12-03T06:34:24Z")

</div>

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

- What’s your URL? [https://intheair.aersure.com](https://intheair.aersure.com)
- What version of Ghost are you using? 2.6.1
- What configuration? Self Hosted
- What browser? Chrome
- What errors or information do you see in the console? **_Failed to send email. Reason: connect ETIMEDOUT 74.125.24.109:465_**
- What steps could someone else take to reproduce the issue you’re having? Tried to change the configuration file but to no avail.

I am using a Gmail account as the SMTP server.

---

<div class="post-metadata">

**Author:** ![AaronMichael](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmichael/32/2891_2.png) [@AaronMichael](https://forum.ghost.org/u/AaronMichael)\
**Post date:** [December 3, 2018, 7:28am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/2 "2018-12-03T07:28:21Z")

</div>

Could there be something to do with the following error when restarting ghost?

1. Validating config

Error detected in the production configuration.

Message: Config file is not valid JSON

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [December 3, 2018, 2:43pm UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/3 "2018-12-03T14:43:19Z")

</div>

Yep, run your config through a JSON validator (for example, [https://jsonlint.com/](https://jsonlint.com/)) and make sure it passes :)

---

<div class="post-metadata">

**Author:** ![DaZiYuan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daziyuan/32/1990_2.png) [@DaZiYuan](https://forum.ghost.org/u/DaZiYuan)\
**Post date:** [December 4, 2018, 2:19am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/4 "2018-12-04T02:19:30Z")

</div>

> **[ghost-email | 笔记 | 巨应君](https://www.mscoder.cn/program/ghost-email/)**
>
> 巨应君的笔记

google translate

---

<div class="post-metadata">

**Author:** ![AaronMichael](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmichael/32/2891_2.png) [@AaronMichael](https://forum.ghost.org/u/AaronMichael)\
**Post date:** [December 4, 2018, 4:35am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/7 "2018-12-04T04:35:42Z")

</div>

I’ve followed your steps but receive the following error:

`Request was rejected due to server error`

This is my file:

```
"mail": {
		"from": "<noreply@aersure.com>",
		"transport": "SMTP",
		"options": {
			"service": "Gmail",
			"host": "smtp.gmail.com",
			"port": 465,
			"secureConnection": true,
			"auth": {
				"user": "noreply@aersure.com",
				"pass": "password"
			},
```

---

<div class="post-metadata">

**Author:** ![AaronMichael](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmichael/32/2891_2.png) [@AaronMichael](https://forum.ghost.org/u/AaronMichael)\
**Post date:** [December 5, 2018, 1:48am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/8 "2018-12-05T01:48:16Z")

</div>

I found out that Digital Ocean, blocks all SMTP ports. Any way to go around this? I also signed up for Mailgun and still can’t send out emails.

---

<div class="post-metadata">

**Author:** ![DaZiYuan](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daziyuan/32/1990_2.png) [@DaZiYuan](https://forum.ghost.org/u/DaZiYuan)\
**Post date:** [December 10, 2018, 7:11am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/9 "2018-12-10T07:11:36Z")

</div>

I use aliyun,it’s dashboard can open port 465/465 for output direction

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [December 24, 2018, 7:16am UTC](https://forum.ghost.org/t/cant-figure-out-how-to-setup-email/4355/10 "2018-12-24T07:16:19Z")

</div>

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