Ghost issue with subscriber email and mail configuration
-
Hey guys, I recently installed Cloudron 1-click through Digital Ocean and started running my Ghost CMS app. The whole process was fairly quick and didn't take much time.
The problem for me is emails and signup, I was able to access my Ghost Admin, my blog and everything looks fine but new members are not able to signup
It first said "Please enter a valid email" which I corrected by following their email docs. Now that is fixed, now it's showing "please check your inbox for confirmation email" at signup but no messages are being sent!
To fix this I followed their setup instructions for Mailgun and have updated that in my Admin settings and in config json file. After the changes are made, we need to restart the app for config changes to take place, when I restart Cloudron again puts in it's own config for email (the default). I even tried to add my Mailgun credentials in Outbound email settings of Cloudron, issue still remains!!
Shouldn't we have control over what config is being used instead of being forced into defaults?
This sounds similar problem to this - Can we use Cloudron smtp for ghost email config
-
I note this page in the Ghost docs says:
Ghost Members and newsletters (beta) contains the ability to deliver posts natively by email. You cannot deliver bulk emails to many recipients via SMTP, so a bulk-mail provider is required in order to achieve this.
And:
Why can't I just use SMTP mail config to send email newsletters with Ghost?
Sending a bulk email to many recipients using basic SMTP will result in your IP address being instantly blacklisted and marked as spam by all mail providers. You should never, ever send bulk mail using basic SMTP, which is why Ghost does not support it.
So perhaps that is why this isn't working?
-
Apps on Cloudron are setup to use the Cloudron mail infra to send out emails. On every app restart we will overwrite the mail sending settings. Ideally we could disable the mail portion of the settings in the Ghost UI to avoid this confusion.
So in your case the root issue lies somewhere in the Cloudron mail sending itself. You can setup Mailgun as the outbound email relay through the Cloudron dashboard. This would then also fix mail delivery issues for all other apps.
-
As @nebulon said, put the mailgun credentials in cloudrons mail server instead of inside ghost. This setting is in email -> outbound.
-
@girish yup did this too! Email -> Outbound -> input my Mailgun settings -> Saved.
Still not working. I'm able to send test email but the actual signup form emails are unsent.
-
@iamdinakar let me try this in my local cloudron now.
-
@iamdinakar OK, I go this working (cc @atrilahiji as well)
The "tricky" part is that Ghost seems to want to send emails as
noreply@domain.com
. It also wants send newsletter by default asnoreply@ghost.domain.com
(i.e the app's domain).I will show how to setup Ghost to setup an email address
newsletter@domain.com
instead.-
We have to create a mailbox in your domain dedicated for this newsletter. If your domain is hosted on Cloudron, you go to mailboxes and create one. I created
newsletter@cloudron.space
. You can skip this if your email is hosted elsewhere (and you have to create the mailbox in your mail provider instead). -
Recall that I said that Ghost wants to send emails with multiple email addresses
noreply
andnewsletter
. For this to work, we have to enable Masquerading in Cloudron's mail server. -
Next, we configure the email address for the Ghost app to be
newsletter@domain.com
. -
Next, go to Ghost and enable members (under Labs)
-
Change the Support and Newsletter email addresses in the members UI to the
newsletter@domain.com
. -
You have to confirm the email Ghost sent to
newsletter@domain.com
Testing
-
Go the blog and click Subscribe button in the top nav bar. It pops up a dialog.
-
Click subscribe
-
Check inbox
-
-
@girish I haven't noticed issues with login emails or newsletter emails without any additional setup. I'll double check everything.
-
Thought I'd test again too after seeing this post.
I've also not had an issue, just standard Ghost + Casper theme + Mailgun API entered in the Lab settings.
marcusquinn.com if anyone wanted to subscribe. Won't be posting for a while though, time is limited with family care needs for a while.
-
I've got this issue too, and can't (yet) do the proposed solution @girish has posted because I've only got outgoing mail set-up for the domain I wanted Ghost to be on
I've got Mailgun API in Ghost Labs section, and Outgoing Mail for the Domain the Ghost app is installed on on Cloudron has Mailgun SMTP details added too.
But no emails arrive...
-
@marcusquinn said in Ghost issue with subscriber email and mail configuration:
I've also not had an issue, just standard Ghost + Casper theme + Mailgun API entered in the Lab settings.
I assume Ghost installed on Cloudron?
Have you got outgoing emails set to Mailgun on Cloudron?
And do you have incoming emails set-up for marcusquinn.com set-up on Cloudron too?
I assume you've got all the DNS records from Mailgun set-up?
@marcusquinn said in Ghost issue with subscriber email and mail configuration:
marcusquinn.com if anyone wanted to subscribe. Won't be posting for a while though, time is limited with family care needs for a while.
Can confirm that your emails arrive.
Although annoyingly can't close the confirmation banner at the top once I confirmed:
-
@jdaviescoates Think that's a bug with the theme, a refresh of click should clear, but yeah, all on Cloudron and standard setup in Ghost and standard Cloudron SMTP setup, not using Mailgun for that.
-
@marcusquinn ok thanks.
Hmz, so I wonder why it's not working for myself and @iamdinakar
-
@jdaviescoates So, the issue is you do not get emails? Where is your incoming mail server?
-
@girish I think the issue is the the mails are not sent.
The incoming mail sever for the domain is Google Apps/ G Suite/ whatever the hell it is called these days
-
To check things on order:
-
Ghost is configured to send mail via Cloudron. Cloudron is configured to send mail via Mailgun.
-
Now, check is Cloudron can send mail. There is a test mail button in the Email view for each domain.
-
Then, send a test mail from Ghost. You can check in Cloudron Mail Server logs, if Ghost even tries to send mail via Cloudron.
-
Finally, if all works, it probably ended up in Spam. If it's not even in Spam, it's probably because google blackholed it. I have seen this happen sometimes when email gets accepted by Google but it just "disappears"/ not seen by user at all.
-
-
@girish said in Ghost issue with subscriber email and mail configuration:
Ghost is configured to send mail via Cloudron.
I'm unclear about this. Ghost requires that you use Mailgun to use it's Membership features. And @marcusquinn says he has it working be putting his Mailgun API into his Cloudron-hosted Ghost
-
@girish said in Ghost issue with subscriber email and mail configuration:
Now, check is Cloudron can send mail. There is a test mail button in the Email view for each domain.
Test mail arrives fine.
-
@girish said in Ghost issue with subscriber email and mail configuration:
Then, send a test mail from Ghost. You can check in Cloudron Mail Server logs, if Ghost even tries to send mail via Cloudron.
Can't see anything in the logs. But then I've got my Mailgun API in the Ghost Members setting in the Lab section of settings, because that is what you have to use.
/me goes to Mailgun to see what what I can see there...
-
@jdaviescoates I now realize maybe we are talking of different things. One is membership setup for which I posted the instructions in https://forum.cloudron.io/post/15371 . This did not require any mailgun related things. I guess you are talking about the newsletter which is maybe configured somewhere else (https://ghost.org/faq/mailgun-newsletters/)
-
Found it. This is indeed required for newsletter delivery (and not for the members to sign up afaict). Are members able to sign up on your site?
-
@girish now I'm doubly confused!
The Email newsletter settings are within the Members (Beta) section of Lab in Ghost settings:
If you look here:
https://ghost.org/faq/mailgun-newsletters/
It seems you can use SMTP to sign people up, but not to them actually email them:
-
@girish said in Ghost issue with subscriber email and mail configuration:
Are members able to sign up on your site?
No. Probably because I've entered Mailgun API into the field shown in my screenshot above but it doesn't work.
Perhaps I've pasted in the wrong thing or something!
-
@jdaviescoates said in Ghost issue with subscriber email and mail configuration:
Perhaps I've pasted in the wrong thing or something!
Possibly because I hadn't whitelisted my IP! Seems like you possibly have to do that!
Although now I've done that and it's still not working... but now I'll go and check your other instructions again too..
-
@jdaviescoates said in Ghost issue with subscriber email and mail configuration:
It seems you can use SMTP to sign people up, but not to them actually email them:
Yes, exactly. I caused the confusion because I didn't understand the setup properly. My understand now is that there are two settings within Members section:
-
One is when a user signs up, they get a confirmation email. You can configure what address this confirmation email comes from. This email is sent via SMTP. In Cloudron's case, the flow is Ghost -> Cloudron Email -> Mailgun. Looks like you have this working already? I posted the instructions for only this part previously in https://forum.cloudron.io/post/15371
-
Second is when you want to send an email to all your subscribers. This is via the Mailgun setting inside Ghost. This is the part that is not working for you, I think? Also, my understanding is that this part is not at all related to sign up, confirmation emails etc.
-
-
@girish said in Ghost issue with subscriber email and mail configuration:
Looks like you have this working already?
No.
Most bizarrely, I went and created newsletter@uniteddiversity.com whilst following your instructions, and the confirmation emails to update the Ghost support and newsletter email DID arrive.
But when I try to subscribe, those confirmation emails do NOT arrive
-
I thought perhaps it was a Google blackhole thing happening (although that wouldn't exaplain why newsletter@uniteddivesity.com confirmation emails arrived), but I just tried subscribing using a fully Cloudron hosted email and that didn't arrive either
And there is nothing in the logs about it even trying to be sent.
-
All,
I have been banging my head with the same/similar use case
Ghost + Outbound Only using Mailgun
After making needed DNS entries and messing with the Mailgun and API keys until the newsletter settings worked I still was not getting the expected outcome...
From what I have seen: https://forum.ghost.org/t/ghost-3-1-cant-get-mailgun-member-signup-working-on-my-ghost-install/10533/16
"The Mailgun configuration under the Members>Email Settings area is only for bulk email newsletters sent to members when you publish posts with the βSend emailβ toggle on.The config.production.json email configuration is for any transactional email that Ghost sends, eg. Staff invites, forgotten password, member signin/signup emails, etc. This doesnβt have to be configured to use Mailgun but it should be set up to use a proper transactional email service if you want to get high deliverability.
Another source: https://ghost.org/docs/concepts/config/
I was able to locate and replace the advised settings but came to another barrier - it requires the Ghost CLI to run "ghost restart"
/home/cloudron/ghost# ghost restart
You can't run commands as the 'root' user.
Switch to your regular user, or create a new user with regular account privileges and use this user to run 'ghost restart'.
For more information, see https://ghost.org/docs/install/ubuntu/#create-a-new-user-.Figured I would ask if this is best practice for cloudron or if there is another method before diving into attempting to make another user
-
All,
Given Cloudron architecture would it be best to fork the ghost app, alter config.production.json.template - "mail" to the needed values and manually build the app?
Considering the app cant be updated via Cloudron GUI that is a limitation one would have to accept until or unless there is a more efficient method for the (Outbound only + Mailgun) use case...
-
@plusone-nick said in Ghost issue with subscriber email and mail configuration:
I was able to locate and replace the advised settings but came to another barrier - it requires the Ghost CLI to run "ghost restart"
You can just restart the app from Cloudron's dashboard. App -> Repair -> Restart app.
-
@girish I originally tried that with no success, I figured that the Ghost CLI command initiated some other process or method