Emails Not Sending

I am running Ghost 5.39.0 at NameCheap and using Mailgun for email sends. I made a new post today and sent myself a test message that works just fine, shows up in Mailgun analytics, and my inbox.

When I publish (and send) all looks well for 20 minutes and then I get a message in my published list like so:

Then this when I click in:

When I try to view the analytics page for the post I get a 500 error page with a red error message at the top, the text of which is:

Internal server error, cannot read post. An unexpected error occurred, please try again. select posts., (with k as (select member_id from members_subscription_created_events where = members_subscription_created_events.attribution_id union select member_id from members_created_events where = members_created_events.attribution_id) select count() from k) as count__conversions, posts., (select count(distinct members_click_events.member_id) from members_click_events inner join redirects on members_click_events.redirect_id = where = redirects.post_id) as count__clicks, posts., (select COALESCE(ROUND(AVG(score) * 100), 0) from members_feedback where = members_feedback.post_id) as count__sentiment, posts., (select count() from members_feedback where = members_feedback.post_id AND members_feedback.score = 0) as count__negative_feedback, posts.*, (select sum(score) from members_feedback where = members_feedback.post_id) as count__positive_feedback from posts where (posts.type = ‘post’ and posts.status in (‘draft’, ‘published’, ‘scheduled’, ‘sent’)) and = ‘642084d362794e006c72f703’ limit 1 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘k as (select member_id from members_subscription_created_events where post’ at line 1


I found some old articles but they didn’t lead to answers.

Where can I start in looking to fix this? Any pointers appreciated.

What version of MySQL are you running?

Ok here.

Seeing this now.
Guess I need to reach out to my provider.

You need to upgrade to MySQL 8. However, before you do this, I’d downgrade Ghost to the last known version. For example,

ghost update --force 5.20.0

Alternatively, restore a snapshot or backup. Always backup before making significant changes to your server.

1 Like

Thank you. I wish I had access to do this. Unfortunately, I do not have a lot of faith in the Ghost support with my provider.

Option C. Move to Ghost Pro :)

1 Like