Local Ghost 3.0 - subscribing does not work

I am having the same issue with a 3.0.3 Ghost installation and Lyra (https://secareanu.ro), although the mail config works (it’s setup up as direct, and sends emails through Digital Ocean droplet infrastructure) as I’ve managed to register one of my emails, but other people trying to register cannot as the “please provide a valid email address” message pops up after a while, even though the emails are valid (and the test email function in admin works, delivers the email to my inbox).

image

I have yet to test it with a different setup (i.e. AWS smtp or SES) and see if the issue persists and if it’s caused by Ghost or rather the DO droplet.

image

1 Like

@dsecareanu which email provider have you set up? For many services unless you’ve fully completed the setup they will only let you email your own domain so it’s typical to find that emails to yourself (test emails) or staff members (same domain) work fine but once you are emailing other domains (members) the email will fail.

There is no email provider setup, the blog sends emails “Direct”-ly. It worked for a @gmail.com address (it also works for the blog’s domain), but it doesn’t work for a @hotmail.com address. The blog’s email address is the domain’s address, meaning @secareanu.ro. Emails usually end up in spam, even though the DO droplet has a fixed ip.

I’ve done the AWS SES/SMTP setup and now it seems that the subscriptions work fine (at least there is no more error message about invalid email address, need to check if it sends the confirmation messages). Yes, it works now.

Hello, I am experiencing the same problem here… I am able to successfully send an email in “labs → test email configuration”, but when trying to sign up a subscriber I get the same error as everyone else here. My site: https://www.codegravy.tech/

I have tried signing up a mail-tester email: test-nxxxtedyr@mail-tester.com to do some mail quality analysis, but it’s not working. I have been able to sign up my private @live.com email, which have nothing with my domain or my email server to do.

I can see in the logs that the reason why the subcribe requiest is failing is due to the sender address not being recognized as an owned address by the auth.

Let me share my logs…

   2020-03-02T23:45:28.554730+00:00 heroku[router]: at=info method=POST path="/ghost/api/v3/admin/mail/test/" host=www.codegravy.tech request_id=5571d74f-c72a-4f21-8142-04eefa318700 fwd="77.241.141.98" dyno=web.1 connect=0ms service=2043ms status=200 bytes=639 protocol=https
    2020-03-02T23:45:28.555911+00:00 app[web.1]: [2020-03-02 23:45:28] e[36mINFOe[39m "POST /ghost/api/v3/admin/mail/test/" e[32m200e[39m 2042ms
    2020-03-02T23:45:54.975938+00:00 heroku[router]: at=info method=POST path="/ghost/api/canary/members/send-magic-link/" host=www.codegravy.tech request_id=6db2ddb4-8b5e-4f51-895f-a1d0d54e4dff fwd="77.241.141.98" dyno=web.1 connect=0ms service=1044ms status=500 bytes=262 protocol=https
    2020-03-02T23:45:54.974039+00:00 app[web.1]: [2020-03-02 23:45:54] e[31mERRORe[39m Failed to send email. Reason: Mail from command failed - 553 5.7.1 Sender address rejected: not owned by auth user..
    2020-03-02T23:45:54.974056+00:00 app[web.1]: e[31m
    2020-03-02T23:45:54.974058+00:00 app[web.1]: e[31mFailed to send email. Reason: Mail from command failed - 553 5.7.1 Sender address rejected: not owned by auth user..e[39m
    2020-03-02T23:45:54.974058+00:00 app[web.1]: 
    2020-03-02T23:45:54.974059+00:00 app[web.1]: e[33m"Please see https://ghost.org/docs/concepts/config/#mail for instructions on configuring email."e[39m
    2020-03-02T23:45:54.974059+00:00 app[web.1]: 
    2020-03-02T23:45:54.974060+00:00 app[web.1]: e[1me[37mError ID:e[39me[22m
    2020-03-02T23:45:54.974061+00:00 app[web.1]:     e[90mf53735c0-5cdf-11ea-b456-1ba4e3a6a824e[39m
    2020-03-02T23:45:54.974062+00:00 app[web.1]: 
    2020-03-02T23:45:54.974062+00:00 app[web.1]: e[90m----------------------------------------e[39m
    2020-03-02T23:45:54.974062+00:00 app[web.1]: 
    2020-03-02T23:45:54.974063+00:00 app[web.1]: e[90mEmailError: Failed to send email. Reason: Mail from command failed - 553 5.7.1 Sender address rejected: not owned by auth user..
    2020-03-02T23:45:54.974064+00:00 app[web.1]:     at EmailError.GhostError (/app/node_modules/ghost/core/server/lib/common/errors.js:10:26)
    2020-03-02T23:45:54.974065+00:00 app[web.1]:     at new EmailError (/app/node_modules/ghost/core/server/lib/common/errors.js:34:20)
    2020-03-02T23:45:54.974065+00:00 app[web.1]:     at createMailError (/app/node_modules/ghost/core/server/services/mail/GhostMailer.js:50:12)
    2020-03-02T23:45:54.974066+00:00 app[web.1]:     at MailComposer.transport.sendMail [as returnCallback] (/app/node_modules/ghost/core/server/services/mail/GhostMailer.js:92:28)
    2020-03-02T23:45:54.974066+00:00 app[web.1]:     at SMTPConnectionPool._onConnectionError (/app/node_modules/simplesmtp/lib/pool.js:334:17)
    2020-03-02T23:45:54.974067+00:00 app[web.1]:     at SMTPClient.emit (events.js:198:13)
    2020-03-02T23:45:54.974068+00:00 app[web.1]:     at SMTPClient.EventEmitter.emit (domain.js:448:20)
    2020-03-02T23:45:54.974068+00:00 app[web.1]:     at SMTPClient._onError (/app/node_modules/simplesmtp/lib/client.js:373:10)
    2020-03-02T23:45:54.974069+00:00 app[web.1]:     at SMTPClient._actionMAIL (/app/node_modules/simplesmtp/lib/client.js:981:14)
    2020-03-02T23:45:54.974069+00:00 app[web.1]:     at SMTPClient._onData (/app/node_modules/simplesmtp/lib/client.js:354:29)
    2020-03-02T23:45:54.974070+00:00 app[web.1]:     at TLSSocket.emit (events.js:198:13)
    2020-03-02T23:45:54.974070+00:00 app[web.1]:     at TLSSocket.EventEmitter.emit (domain.js:448:20)
    2020-03-02T23:45:54.974070+00:00 app[web.1]:     at addChunk (_stream_readable.js:288:12)
    2020-03-02T23:45:54.974071+00:00 app[web.1]:     at readableAddChunk (_stream_readable.js:269:11)
    2020-03-02T23:45:54.974071+00:00 app[web.1]:     at TLSSocket.Readable.push (_stream_readable.js:224:10)
    2020-03-02T23:45:54.974072+00:00 app[web.1]:     at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
    2020-03-02T23:45:54.974072+00:00 app[web.1]: 
    2020-03-02T23:45:54.974073+00:00 app[web.1]: SenderError: Mail from command failed - 553 5.7.1 Sender address rejected: not owned by auth user.
    2020-03-02T23:45:54.974073+00:00 app[web.1]:     at SMTPClient._actionMAIL (/app/node_modules/simplesmtp/lib/client.js:981:23)
    2020-03-02T23:45:54.974073+00:00 app[web.1]:     at SMTPClient._onData (/app/node_modules/simplesmtp/lib/client.js:354:29)
    2020-03-02T23:45:54.974074+00:00 app[web.1]:     at TLSSocket.emit (events.js:198:13)
    2020-03-02T23:45:54.974074+00:00 app[web.1]:     at TLSSocket.EventEmitter.emit (domain.js:448:20)
    2020-03-02T23:45:54.974075+00:00 app[web.1]:     at addChunk (_stream_readable.js:288:12)
    2020-03-02T23:45:54.974075+00:00 app[web.1]:     at readableAddChunk (_stream_readable.js:269:11)
    2020-03-02T23:45:54.974076+00:00 app[web.1]:     at TLSSocket.Readable.push (_stream_readable.js:224:10)
    2020-03-02T23:45:54.974076+00:00 app[web.1]:     at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)e[39m
    2020-03-02T23:45:54.974076+00:00 app[web.1]: e[39m
    2020-03-02T23:45:54.975392+00:00 app[web.1]: [2020-03-02 23:45:54] e[36mINFOe[39m "POST /ghost/api/canary/members/send-magic-link/" e[31m500e[39m 1043ms

As you can see the first request in the logs is the test mail which succeeds at status 200, the next one is the subscribe “send-magic-link” endpoint, which fails due to: SenderError: Mail from command failed - 553 5.7.1 Sender address rejected: not owned by auth user.

I was getting the same error when trying to send the tests emails until i added:

mail: {
  from: '"codegravy" <noreply@codegravy.tech>',
  . 
  .
}

This fixed the test mail as the sender was overwritten in node mailer with this predefined from value.

However this does not seem to be the case for the subscribe procedure, perhaps the message being sent with nodemailer is not overwritten with the value?

This is definitely an ongoing problem. I get the same thing. Email works for the test email and for notification emails about new posts. However, emails to sign up new members do not work.

I tried using both of the membership themes and it does not make a difference:

  • Lyra

  • Pico

Has anyone gotten this to work? Other people seem to have the same issue:

Commenting out the line of code did not solve the problem for me. Using MailGun.

1 Like

Just a follow up to my earlier post. It appears that the issue was with MailGun. Once I ditched it, everything worked fine.

Yep, mailgun wont send mails unless you upgrade or have the recipient in your contacts. There are a growing number of threads on this topic, please vote here :slight_smile: : Are you happy with Mailgun? Poll and thread about emailing in ghost - #3 by rpuls

No, I don’t think you have to upgrade so much as you have to open a ticket with Mailgun and have them improve the quality of the free IP one is on by default, as I briefly mentioned here.

Perhaps that should be made clearer on the Ghost end since Mailgun certainly won’t be saying it out in the open.

That being said, wanting to get ahead of the curve with the second blog/publication I was setting up I pre-emptively opened a ticket with Mailgun so the email issue wouldn’t occur again. They wouldn’t reply until things demonstrably failed, I then opening a second ticket in order to make the request again.

I found a different issue that relates to this. Symptom was the same (“Please enter a valid email address”) but only occurred after I’d configured Mailgun in my production configuration.

Looking at the log (content/logs/https___blog_example_org_uk__production.log) I spotted this error:

{“name”:“Log”,“hostname”:“ghost-server”,“pid”:14032,“level”:50,“err”:{“id”:“redacted”,“domain”:“https://blog.example.org.uk/",“code”:null,“name”:“EmailError”,“statusCode”:500,“level”:“normal”,“message”:"Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”,“help”:“"Please see Configuration - Adapt your publication to suit your needs for instructions on configuring email."”,“stack”:“EmailError: Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.\n at EmailError.GhostError (/var/www/versions/3.13.4/core/server/lib/common/errors.js:10:26)\n at new EmailError (/var/www/versions/3.13.4/core/server/lib/common/errors.js:34:20)\n at createMailError (/var/www/versions/3.13.4/core/server/services/mail/GhostMailer.js:50:12)\n at MailComposer.transport.sendMail [as returnCallback] (/var/www/versions/3.13.4/core/server/services/mail/GhostMailer.js:92:28)\n at SMTPConnectionPool._onConnectionError (/var/www/versions/3.13.4/node_modules/simplesmtp/lib/pool.js:334:17)\n at SMTPClient.emit (events.js:198:13)\n at SMTPClient.EventEmitter.emit (domain.js:448:20)\n at SMTPClient._onError (/var/www/versions/3.13.4/node_modules/simplesmtp/lib/client.js:373:10)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at emitErrorNT (internal/streams/destroy.js:91:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)\n at process._tickCallback (internal/process/next_tick.js:63:19)\n\nError: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n”},“msg”:“Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”,“time”:“2020-04-23T19:16:49.252Z”,“v”:0}

A workaround seems to be to disable the secure email element of using Mailgun:

  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 587,
      "secureConnection": false,
      "auth": {
        "user": "redacted",
        "pass": "redacted"
      }
    }
  },

(Previously secureConnection was set to true.)

This isn’t optimal, and I’d rather use a secure connection. Is this a problem with Ghost or do I need to do a Node update of some description?

Current versions

  • Ghost-CLI version: 1.13.1
  • Ghost version: 3.13.4
  • Node version: 10.16.0
  • Npm version: 6.9.0

Any help gratefully received!

2 Likes

The problem is also present with:

  • Ghost-CLI version: 1.13.1
  • Ghost version: 3.13.4
  • Node version: 12.16.2
  • Npm version: 6.14.4
1 Like

There’s similar discussions in this thread, where I’ve added further details:

Testing Mailgun with curl from my blog server works correctly, the issue appears when using the send email test feature - I’ve not tried actually sending a newsletter yet.

Hi All, facing the same issue on www.learnto.taketheleap.io
Noob Question: I didn’t really opt for using Mailgun, is that automatically implied when I turn on the members options in Ghost?

The only runaround I can think of right now is to use an external forms provider like mailchimp/emailoctopus, however that defeats the purpose of having any membership specific posts on Ghost…

Did anyone find a solution to this yet?

1 Like

I’m having the same issues. Sending an email newsletter WORKS. Trying to subscribe or login from the site pages does NOT WORK.

Hopefully that simplifies some of the concerns I’ve seen here. We really need a fix for this.

1 Like

Same here, the problem is at the mailing configuration from config.production.json.

I am having the same issue . Subscribe /sign up email does not work .

1 Like

can someone from ghost team help , this is an issue that needs ressolution

did you find a solution to this . If I find I will share.

Hey to everyone on this thread. Subscribing in Ghost members definitely works, and it seems like each one of you is having problems getting email configured. It’s impossible for the team to help troubleshoot “same here” type comments on a big thread, therefore I’m going to leave a general how to guide as the solution here, and close and lock this thread.

Configuring Email for Members

You need to configure two sets of email settings for Members:

1. Transactional Email

This is a stable feature, you should get this working first.

Transactional email is used for staff user invites and forgotten passwords in a standard Ghost blog. With members it’s also used for the subscribe, signup and signin emails.

Configuration docs are here. This is fairly flexible, you can use Mailgun, but you can also use other methods if you prefer.

 


2. Bulk Email Newsletters

You cannot send bulk email via standard SMTP, so bulk email delivery for newsletters requires its own configuration. Currently the only bulk mail service available is Mailgun, but we will likely add more in future.

Once configured, you can set it by writing post and sending a test email when publishing it as described here:


That’s it for getting both types of email working. Any problems here are configuration problems, either with Ghost, or with your mailgun account not being in the right state (mailgun restricts who you can send emails to in test mode).

Getting Help

If you’re having problems after following the steps in this thread and you want help troubleshooting your configuration, please start your own new “Help” thread, and make sure you share all the details including:

  • your platform details - where and how you’re installing Ghost
  • what theme you are using
  • your member settings (is allow free signup on or off)
  • which type of email is not working
  • your configuration for the broken email type
  • any errors you’re seeing

And we’ll be able to help troubleshoot on a case-by-case basis.

4 Likes