Problem sending mail from Ghost

Hello. My version is 3.40.1
Sending mail from the server does not work for me. When trying to change in the admin part (Enable members) Email addresses
Contact information used for newsletters and member login emails throws an error and the address is not saved. Sending mail from the frontend also does not work. In the configuration file, I tried to configure sending from another server through the SMTP, it also did not help. Here is my log log.


[2021-01-09 09:05:28] INFO “GET /members/api/site/” 304 1ms
[2021-01-09 09:05:28] WARN Cookie ghost-members-ssr not found
[2021-01-09 09:05:28] INFO “GET /members/api/member/” 400 1ms
[2021-01-09 09:05:29] INFO “GET /content/images/size/w1000/2021/01/demo.gif” 302 1ms
[2021-01-09 09:05:44] INFO “PUT /ghost/api/v3/admin/settings/” 200 82ms
[2021-01-09 09:05:44] WARN Cookie ghost-members-ssr not found
[2021-01-09 09:05:44] INFO “GET /” 200 189ms
[2021-01-09 09:06:34] INFO “PUT /ghost/api/v3/admin/settings/” 200 102ms
[2021-01-09 09:06:37] INFO “PUT /ghost/api/v3/admin/settings/” 200 92ms
[2021-01-09 09:06:40] WARN Cookie ghost-members-ssr not found
[2021-01-09 09:06:40] INFO “GET /” 200 204ms
[2021-01-09 09:06:40] INFO “GET /content/images/size/w30/2021/01/demo.gif” 302 2ms
[2021-01-09 09:06:40] INFO “GET /members/api/site/” 304 1ms
[2021-01-09 09:06:41] WARN Cookie ghost-members-ssr not found
[2021-01-09 09:06:41] INFO “GET /members/api/member/” 400 1ms
[2021-01-09 09:06:41] INFO “GET /content/images/size/w1000/2021/01/demo.gif” 302 1ms
[2021-01-09 09:06:53] ERROR

NAME: EmailError
MESSAGE: Failed to send email.

level: normal

“Please see https://ghost.org/docs/concepts/config/#mail for instructions on configuring email.”
EmailError: Failed to send email.
at EmailError.GhostError (/var/www/xxxxxx/versions/3.40.1/node_modules/@tryghost/errors/lib/errors.js:10:26)
at new EmailError (/var/www/xxxxxx/versions/3.40.1/node_modules/@tryghost/errors/lib/errors.js:34:20)
at createMailError (/var/www/xxxxxx/versions/3.40.1/core/server/services/mail/GhostMailer.js:52:12)
at EventEmitter. (/var/www/xxxxxx/versions/3.40.1/core/server/services/mail/GhostMailer.js:114:24)
at Object.onceWrapper (events.js:421:26)
at EventEmitter.emit (events.js:314:20)
at EventEmitter.emit (domain.js:483:12)
at DirectMailer. (/var/www/xxxxxx/versions/3.40.1/node_modules/directmail/lib/mailer.js:174:38)
at SMTPClient. (/var/www/xxxxxx/versions/3.40.1/node_modules/directmail/lib/mailer.js:292:13)
at Object.onceWrapper (events.js:420:28)
at SMTPClient.emit (events.js:314:20)
at SMTPClient.EventEmitter.emit (domain.js:483:12)
at SMTPClient._destroy (/var/www/xxxxxx/versions/3.40.1/node_modules/simplesmtp/lib/client.js:310:10)
at SMTPClient._onEnd (/var/www/xxxxxx/versions/3.40.1/node_modules/simplesmtp/lib/client.js:410:10)
at Socket.emit (events.js:326:22)
at Socket.EventEmitter.emit (domain.js:483:12)

[2021-01-09 09:06:53] INFO “POST /members/api/send-magic-link/” 500 802ms
[2021-01-09 09:07:00] WARN Cookie ghost-members-ssr not found
[2021-01-09 09:07:00] INFO “GET /rss/” 200 182ms


This problem appeared out of nowhere, everything worked yesterday. And today this problem has appeared.

@javi had the same issue a few days ago and we tried to debug it, but we didn’t manage.

I see some other people are reporting similar issues on the forum, there might be a bug somewhere.

How do I set up mail?
Everything is correctly indicated in the documentation.
You have two options or Mailgun or any other SMTP server of yours.

#Send from local server
// config.production.json

“mail”: {
“transport”: “Direct”
},

Here is the Mailgun variant.
#Register on Mailgun and change // config.production.json

“mail”: {
“transport”: “Direct”
},

#On // config.production.json

“mail”: {
“transport”: “SMTP”,
“options”: {
“service”: “Mailgun”,
“auth”: {
“user”: “postmaster@example.mailgun.org”,
“pass”: “1234567890”
}
}
},

Then, in the admin panel, add the desired mail and register the domain and Mailgun keys

Sending from your SMTP // config.production.json

“mail”: {
“transport”: “SMTP”,
“options”: {
“host”: “YOUR-SES-SERVER-NAME”,
“port”: 465,
“service”: “SES”,
“auth”: {
“user”: “YOUR-SES-ACCESS-KEY-ID”,
“pass”: “YOUR-SES-SECRET-ACCESS-KEY”
}
}
}
From address

Important: “service”: “SES”,

About the proxy. Installation and configuration should be done with the proxy disabled.

Enjoy your work and good mood.