Local Ghost 3.0 - subscribing does not work

As the title says, it does not work for me. I just downloaded the new v3.0 and got it running to update my theme with custom additions from 2.0.

But I’m unable to enter my e-mail, as it just gives my this error (after 30 seconds of thinking):

3 Likes

Is that error message hardcoded in your theme? Or coming back from the server?

Do you have a local mail config set up? If not you’ll either have to setup a local mail config OR check your server logs to see that we output the contents of the email when running locally so you can test/develop!

It’s just a simple div in the new theme Lyra for the 3.0 launch:

<div class="message-error">
    Please enter a valid email address!
</div>

This is for the newly launched 3.0, where you can have members use the subscribe button on your page.

In 2.0, I could use the subscribe feature with no problems, no setup. So I’m not exactly sure how this will be able to work locally?

Fabien has explained how it is possible to use this locally. You have two options:

  1. setup working mail config
  2. (easier for dev) use the server logs to view the generated email links

To explain the full steps for anyone reading this:

On Mac OS, you can either use ghost install local or a source install to get Ghost running locally.

For option 1 - working mail config.

  • You need to edit the config.development.json file with a valid mail config, as per the mail docs.
  • For Ghost CLI this file is in the root folder where you installed Ghost
  • For install-from-source this file is currently also in the root folder, but watch out as it’s checked in and therefore gets overridden - very much recommend using the logs here.

For option 2 - use server logs.

  • If you’re using ghost cli, run ghost log to see the generated email content
  • If you’re using a source install, the content will appear in your console

All of this assumes that you’ve already:

  • Enabled members in labs (no need to change any settings, the defaults are fine).
  • Installed a members-enabled theme, like Lyra

@MLFromScratch I’ve tried both methods locally on my Mac and they work just fine. Your error message suggests either you’ve got misconfigured mail, or there’s some other problem with your specific setup and we’d need a lot more info: E.g. OS, DB, Node version, browser, config etc to help you debug.

3 Likes

I’m experiencing the exact same issue. Ghost isn’t providing anything helpful in the logs. What’s interesting is email is working fine with the admin panel for testing email settings.

Having similar issue.

I’ve worked out that with " Allow free member signup" setting OFF it does nothing when trying to ‘subscribe’. But then it allows you to use that when this setting is ON.

But then, it redirects to choose membership.

So I guess it creates the free version account immediately with this default subscribe option, and then if they don’t pick a payment option they remain that way.

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

@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.

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

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.