Posted: May 4, 2022 at 2:40 pm
|
Hi, I have some messages that produced an unknown error. The messages have status “mrt”. However, resending them with the “Send Immediately” button produces an error: “No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error.”. After some debugging I found that the problem seems to lie in “EE_Messages_Queue.lib.php”. In the function “execute” it checks if the message status is eligible for sending: “if (! in_array($message->STS_ID(), EEM_Message::instance()->stati_indicating_to_send())) {“. However, the array returned by “stati_indicating_to_send” does not contain the “mrt” status code (only “mid” and “mrs”), which seems odd. Is this a bug, or is this intentional and is the error somewhere else? Btw, I’m not sure if this forum is the best place for this type of developer-oriented bug reports. If there is a better place, let me know! |
Hi there! Thanks for contacting us! In order to assist you better, could you provide me with the step by step to allow me to reproduce this error? Thanks! |
|
|
Sure! Step 1: Have a message with the MRT status (occurs after a wp_mail failure, I think). (Simplest is probably to do this in the DB: For any message, set STS_ID in the wp_esp_message table to MRT.) Then the error message appears and the message has not been sent. |
Hi there! Thanks for contacting us! Thanks! |
|
|
I don’t think I’m able to do that due to European privacy regulations. Does this mean that you are unable to produce the reported error? The code suggests that this error always happens when sending any MRT message. |
Hi there, I can reproduce this locally, however, currently, Event Espresso intentionally ignores the above status within the message queue and the reason we do that is we found some mail server configs returning an error on sending…. but actually sending the email. That meant that every time the message queue tried to trigger the above message to send, it caused a ‘duplicate’ message to be sent even though the mail server still returned an error on sending (logically, that means the email shouldn’t have sent). As that ‘can’ happen every 5 minutes we chose not to include those messages in the default sending stati within the automated queue and that is why it is not included within Now, that’s not to say this isn’t a bug (I believe it is) but the fix isn’t as simple as including the above stati as mentioned, it should only be included when messages have been manually triggered. I’ll create a ticket for our developers to investigate this further and see what is going on but you ‘can’ add that status to Here is an example: https://gist.github.com/Pebblo/a539d5c5ec9b6101543854a6dee69267 You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
That makes sense. Perfect, thank you! |
You’re most welcome 🙂 |
|
The support post ‘Unable to resend message after error’ 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.