Support

Home Forums Event Espresso Premium How to create and send a batch message

How to create and send a batch message

Posted: May 8, 2019 at 2:31 am

Viewing 7 reply threads


Kitka

May 8, 2019 at 2:31 am

I have tried the steps outlined on this page: https://eventespresso.com/wiki/how-to-create-and-send-a-newsletter/ but I seem to get some unexpected results. Firstly when I select my recipients and click Send Batch Message, select my message template and add my information, when I click Send, recipients do not receive any of the messages. If I go to the Messages tab in the back end, I can see a message at the top of the list with ‘No recipient’ in the To column and a spanner under the Actions column. If I click the spanner, I just go to a completely blank page that has the URL of the domain followed by: wp-admin/admin.php?page=espresso_messages&action=generate_now&MSG_ID=1621&generate_now_nonce=49ec224891

Any ideas what is going wrong there?


Tony

  • Support Staff

May 8, 2019 at 4:23 am

Hi there,

The white screen will indicate there’s a fatal error being thrown when EE tries to generate the messages.

How many messages are you selecting in a single batch?

If you check the servers error log around the same time that you try to generate the messages, does it show any errors? (Your host will usually provide a method to view site errors within your control panel).


Kitka

May 9, 2019 at 5:59 am

Thanks for your reply. I have selected two registered people, but after trying to send, and then viewing Messages, there is only one message listed there. When I click to generate the message and check in cPanel for Email Routing, I can not see anything being sent. If I go back to the Messages screen and click on Generate Message again, I see this error: An error has occurred:
The messages were not generated. This could mean there is already a batch being generated on a separate request, or because the selected messages are not ready for generation. Please wait a minute or two and try again.


Tony

  • Support Staff

May 9, 2019 at 6:54 am

Thanks for your reply. I have selected two registered people, but after trying to send, and then viewing Messages, there is only one

Ok, so a batch of 2 messages should not cause issues.

When I click to generate the message and check in cPanel for Email Routing, I can not see anything being sent.

There’s an error being thrown before the email is being generated in the queue, this is before EE tries to send it, so you won’t see anything sent.

Did you check the error logs rather than email logs?


Kitka

May 9, 2019 at 5:12 pm

Just cleared the error log, tried to send a batch message again, and this is what appears in the error log:

[09-May-2019 23:11:51 UTC] PHP Fatal error: Uncaught Error: Cannot use object of type EE_Event as array in /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Email_Shortcodes.lib.php:138
Stack trace:
#0 /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Email_Shortcodes.lib.php(85): EE_Email_Shortcodes->_get_event_admin_emails(false)
#1 /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Shortcodes.lib.php(184): EE_Email_Shortcodes->_parser(‘[EVENT_AUTHOR_E…’)
#2 /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php(234): EE_Shortcodes->parser(‘[EVENT_AUTHOR_E…’, Object(EE_Messages_Addressee), Array)
#3 /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php(74): EEH_Parse_Shortcodes->_parse_message_template()
#4 /home/yhabush/public_html/newsite/wp-conten in /home/yhabush/public_html/newsite/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Email_Shortcodes.lib.php on line 138


Tony

  • Support Staff

May 10, 2019 at 4:40 am

Thank you, that helps.

[EVENT_AUTHOR_EMAIL] isn’t actually a valid shortcode you can use within the newsletter template. If you click on the icon next to each of the fields it will show you the valid shortcodes for those fields.

So the bug here is that it’s allowing you to set an invalid shortcode in the modal and then throwing a fatal error. If you edit the template within Event Espresso -> Messages -> Default message templates (or custom if you’ve created a custom template) -> Batch -> Edit Registrant it will have that shortcode in the ‘From’ field (because the modal allowed it) but if you just click save EE will show you that it is invalid.

If you need to use an event authors email address in that field you’ll need to hard code it into the template for the time being. You could create multiple custom template, each with the authors email hard coded and then select the template with the email set when sending the batch email.


Kitka

May 13, 2019 at 5:58 am

Thanks for your help.


Tony

  • Support Staff

May 13, 2019 at 7:35 am

You’re most welcome.

Any further questions/problems please let us know.

Viewing 7 reply threads

The support post ‘How to create and send a batch message’ 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