TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.88k stars 10.21k forks source link

Ghost throws notice of wrong email configuration while it's configured correctly and is working #17339

Closed damirissimo closed 8 months ago

damirissimo commented 1 year ago

Issue Summary

The issue is described thoroughly at Ghost CMS Forum: https://forum.ghost.org/t/ghost-is-currently-unable-to-send-email-notification/38687

In short: Ghost admin shows:

Update available! Ghost is currently unable to send email. See https://ghost.org/docs/concepts/config/#mail for instructions

There are two errors:

  1. There is no Ghost CMS update available. I'm using 5.54.0, which is the latest as for now
  2. Emails are configured correctly. I can send emails to my subscribers (via mailgun), i can receive ghost notices when I have new subscribers signing up, I can change newsletter from email, I can change portal support email.

This line of source code assumes you're using Direct email service, which I am not using in my case.

"mail": {
    "from": "join@domain.com",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 465,
      "secure": true,
      "auth": {
        "user": "name@subdomain.domain.com",
        "pass": "passwordliveshere"
      }
    }
  },

Steps to Reproduce

  1. Configure Ghost emails correctly
  2. Receive incorrect notice :)

Ghost Version

5.54.0

Node.js Version

18.16.1

How did you install Ghost?

Ubuntu

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

phantomhell commented 1 year ago

Ignore this notice if you're have correct configuration. I've often saw this notice and ignore it.

markstos commented 1 year ago

@damirissimo I see the line of code you linked to:

https://github.com/TryGhost/Ghost/blob/6f47002f9de133661391c0d8588147991670f4a2/ghost/core/core/server/api/endpoints/mail.js#L18

But I don't see why it assumes you are using direct mail. The call is using the Node Mailer API, which supports a number of different transports besides SMTP:

https://github.com/TryGhost/Ghost/blob/6f47002f9de133661391c0d8588147991670f4a2/ghost/core/core/server/api/endpoints/mail.js#L18

github-actions[bot] commented 1 year ago

This issue is currently awaiting triage from @daniellockyer. We're having a busy time right now, but we'll update this issue ASAP. If you have any more information to help us triage faster please leave us some comments. Thank you for understanding 🙂

daniellockyer commented 1 year ago

Hey @damirissimo - did you see any other logs for this? I'm unsure why it thinks you're using Direct transport, unless we have a bug lingering around somewhere?

github-actions[bot] commented 1 year ago

Note from our bot: The needs:info label has been added to this issue. Updating your original issue with more details is great, but won't notify us, so please make sure you leave a comment so that we can see when you've updated us.

github-actions[bot] commented 8 months ago

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂