Sending mail not working on a newly migrated Ghost blog

#1

Hey everyone,

I am having issues with one of the blogs I’ve recently moved from AWS to DO as it’s not sending emails (even though it is configured exactly as the other blogs on that server that do send their emails via local Postfix). The error that pops up is the following:

[2019-05-05 11:03:23] ERROR "POST /ghost/api/v2/admin/mail/test/" 500 268ms

NAME: EmailError
MESSAGE: Failed to send email.

level: normal

"Please see https://docs.ghost.org/mail/ for instructions on configuring email."
EmailError: Failed to send email.
    at EmailError.GhostError (/var/www/domain.com/versions/2.21.1/core/server/lib/common/errors.js:10:26)
    at new EmailError (/var/www/domain.com/versions/2.21.1/core/server/lib/common/errors.js:34:20)
    at EventEmitter.<anonymous> (/var/www/domain.com/versions/2.21.1/core/server/services/mail/GhostMailer.js:93:31)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at EventEmitter.emit (events.js:211:7)
    at DirectMailer.<anonymous> (/var/www/domain.com/versions/2.21.1/node_modules/directmail/lib/mailer.js:174:38)
    at SMTPClient.<anonymous> (/var/www/domain.com/versions/2.21.1/node_modules/directmail/lib/mailer.js:292:13)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at SMTPClient.emit (events.js:208:7)
    at SMTPClient._destroy (/var/www/domain.com/versions/2.21.1/node_modules/simplesmtp/lib/client.js:310:10)
    at SMTPClient._onEnd (/var/www/domain.com/versions/2.21.1/node_modules/simplesmtp/lib/client.js:410:10)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)

Server config:

  • ubuntu 18.04
  • nginx 1.16.0
  • mariadb 10.1.38
  • node 8.16.0
  • postfix 3.3.0

Config file:

  "mail": {
    "transport": "Direct"
  },

Ghost doctor doesn’t signal any error in config or other place else.

I am also getting the below error, but not sure what it’s related to:

[2019-05-05 11:03:09] ERROR

NAME: ValidationError
MESSAGE: Validation (isSlug) failed for slug

level: normal

ValidationError: Validation (isSlug) failed for slug
    at new ValidationError (/var/www/domain.com/versions/2.21.1/node_modules/ghost-ignition/lib/errors/index.js:121:23)
    at each (/var/www/domain.com/versions/2.21.1/core/server/data/validation/index.js:348:35)
    at /var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:4911:15
    at baseForOwn (/var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:2996:24)
    at /var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:4880:18
    at Function.forEach (/var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:9344:14)
    at Object.validate (/var/www/domain.com/versions/2.21.1/core/server/data/validation/index.js:320:7)
    at _.each (/var/www/domain.com/versions/2.21.1/core/server/api/shared/validators/input/all.js:46:47)
    at /var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:4911:15
    at baseForOwn (/var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:2996:24)
    at /var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:4880:18
    at Function.forEach (/var/www/domain.com/versions/2.21.1/node_modules/lodash/lodash.js:9344:14)
    at validate (/var/www/domain.com/versions/2.21.1/core/server/api/shared/validators/input/all.js:41:7)
    at Object.browse (/var/www/domain.com/versions/2.21.1/core/server/api/shared/validators/input/all.js:105:32)
    at Object.read (/var/www/domain.com/versions/2.21.1/core/server/api/shared/validators/input/all.js:115:21)
    at allShared (/var/www/domain.com/versions/2.21.1/core/server/api/shared/validators/handle.js:34:58)

Some of the changes done when migrating (that might have smth to do with this):

Thanks!

closed #2

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