Support

Home Forums Event Espresso Premium WRT Emails Not Sending

WRT Emails Not Sending

Posted: December 20, 2016 at 3:25 pm


thomaspointbeach

December 20, 2016 at 3:25 pm

My emails are not sending now, either, so I did some digging. I discovered that Emails are generated and sent via Cron, so my first step was to install Crontrol, a WP plugin that lets you inspect the Cron queue.

The short version of this post is this: Deactivate and Reactivate EventEspresso if you think emails are not sending.

The long version follows…

I noted that the Cron Interval ee_message_cron does exist, but there were no Cron Tasks AHEE__EE_Messages_Scheduler__generation or AHEE__EE_Messages_Scheduler__sending in the queue, even though I had created an order, and there were messages in the generation queue from an hour ago.

So I did some more digging…

These actions were discovered in EE_Messages_Scheduler, they are added in __construct(), defined in the same class, and are added to the EE Task array in register_scheduled_tasks(), which is called in response to the FHEE__EEH_Activation__get_cron_tasks action.

More digging…

FHEE__EEH_Activation__get_cron_tasks is called in EEH_Activation.helper.php::get_cron_tasks(), which is called from self::create_cron_tasks(), which is called from self::initialize_db_content().

More digging…

EEH_Activation.helper.php::initialize_db_content() is called from EE_System::initialize_db_if_no_migrations_required() which is called via an action blah blah…

The rest of the chain just follows down to “EventEspresso Activation”. Which means, in short, if you Deactivate and Reactivate, you should be good to go…

Let me test…

SURE ENOUGH, the message queues are back! So that is neat, I wonder what makes them disappear? Further, it is troubling that there is no sanity checking to ensure that the tasks are running in any way…

Maybe some sort of watch-dog cron that checks the sanity of the crontab? It seems that this occasionally occurs, so perhaps this little business in this SO answer would help?


thomaspointbeach

December 20, 2016 at 3:27 pm

Something else that may be beneficial might be a “Status” panel in the EE Admin, that you can go to which will run some diagnostics and offer options to perform some manual cleanup/fixes… Just a thought.


Josh

  • Support Staff

December 21, 2016 at 8:18 am

Hi there,

I can open a ticket for adding a sanity check to verify that crons tasks are still set up. Since you’re wondering (and we are too) how the message queues disappeared in the first place, may I ask was the database reset in any way prior to the queues disappearing? There’s a function in Event Espresso that removes the queues when the database is updated during a update to a new version, but the queues are added back immediately following their removal.


thomaspointbeach

December 21, 2016 at 8:45 am

Technically I did perform a DB migration, but this was done low-level with mysqldump and an import, and would not have changed any data.

Additional in that sanity check would be good to check read/write permissions on any paths that EE needs access to (if any).

I suggested adding a page (under Settings) because this would allow you to have a singular location to add a number of utilities, like listing and purging orphaned transactions or anything else. Perhaps a good spot for this would be somewhere in the Maintenance page. Or adding the checks for tasks in System Information.

Shouldn’t be too difficult, run EEH_Activation.helper.php::get_cron_tasks() and compare the output with the currently registered tasks.


thomaspointbeach

December 21, 2016 at 8:47 am

Additionally, it would give you another data point when addressing “Emails not sending” questions, which it seems you get a few of… 😉

The support post ‘WRT Emails Not Sending’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso