WordPress is not sending the 2nd email in the same request
-
When I try to send more than one email message in the same request, only de 1st message is sent, the rest of the messages are blocked with the error “Message body empty”.
The following code should send 4 different emails, each one with different subject and message, but only the first one is sent:
$to = "[email protected]"; $subject = "Mail test "; $message = "This is the body "; wp_mail($to, $subject . "1", $message . "1"); // Sent wp_mail($to, $subject . "2", $message . "2"); // Not sent (Message body empty) wp_mail($to, $subject . "3", $message . "3"); // Not sent (Message body empty) wp_mail($to, $subject . "4", $message . "4"); // Not sent (Message body empty)
I’m using WordPress 5.6.2 and WP Mail SMTP 2.6.0
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress is not sending the 2nd email in the same request’ is closed to new replies.