Home › Forums › WordPress Plugins › Mailgun Bulk Mailer Error
- This topic has 5 replies, 2 voices, and was last updated 6 months, 2 weeks ago by
MM.
-
AuthorPosts
-
-
March 8, 2023 at 8:20 am #29818
MM
ParticipantWe are using the Bulk Mailer addon. It worked for the first time but not working right now.
Here is the log output
[09/02/2023 10:04:13] Mailgun returned an error: Your credentials are incorrect. [09/02/2023 10:10:42] Mailgun returned an error: [22/02/2023 04:23:48] [262] In send_bulk_messages(), processing 1 page(s) of data... [22/02/2023 04:23:48] [287] In page 0, sending mail to 1 recipient(s) [22/02/2023 04:23:48] [323] Successfuly processed page 0, with output: Mailgun\Model\Message\SendResponse Object ( [id:Mailgun\Model\Message\SendResponse:private] => <[email protected]> [message:Mailgun\Model\Message\SendResponse:private] => Queued. Thank you. ) [23/02/2023 14:43:00] [262] In send_bulk_messages(), processing 1 page(s) of data... [23/02/2023 14:43:01] [287] In page 0, sending mail to 616 recipient(s) [23/02/2023 14:43:01] Mailgun returned an error: [24/02/2023 16:14:10] [262] In send_bulk_messages(), processing 1 page(s) of data... [24/02/2023 16:14:11] [287] In page 0, sending mail to 45 recipient(s) [24/02/2023 16:14:11] Mailgun returned an error: [02/03/2023 14:14:17] [262] In send_bulk_messages(), processing 1 page(s) of data... [02/03/2023 14:14:17] [287] In page 0, sending mail to 618 recipient(s) [02/03/2023 14:14:18] Mailgun returned an error: [02/03/2023 21:56:30] [262] In send_bulk_messages(), processing 1 page(s) of data... [02/03/2023 21:56:30] [287] In page 0, sending mail to 618 recipient(s) [02/03/2023 21:56:30] Mailgun returned an error: [06/03/2023 20:08:56] [262] In send_bulk_messages(), processing 1 page(s) of data... [06/03/2023 20:08:56] [287] In page 0, sending mail to 618 recipient(s) [06/03/2023 20:08:56] Mailgun returned an error: [08/03/2023 12:39:47] [262] In send_bulk_messages(), processing 1 page(s) of data... [08/03/2023 12:39:47] [287] In page 0, sending mail to 47 recipient(s) [08/03/2023 12:39:47] Mailgun returned an error:
-
March 8, 2023 at 8:22 am #29820
vinny
KeymasterHi MM,
Thanks for reaching out. The logs show that messages were sent successfully on 22/02/2023 04:23:48, but then started failing due to an error from Mailgun. I’ll look into the code as to why the error message is not showing, but this indicates that you should contact Mailgun support to see why they’re blocking the send.
Cheers,
Vinny -
March 22, 2023 at 8:10 am #29868
MM
ParticipantThis did not fix yet.
From Mailgun support
Your account is currently active so if you need help with sending with the API, here is some information that should help you in sending: https://documentation.mailgun.com/en/latest/user_manual.html#sending-via-api Sending a plain text message: curl -s --user 'api:YOUR_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \ -F from='Excited User <mailgun@YOUR_DOMAIN_NAME>' \ -F to=YOU@YOUR_DOMAIN_NAME \ -F [email protected] \ -F subject='Hello' \ -F text='Testing some Mailgun awesomeness!'
Please advise.
-
March 22, 2023 at 8:10 am #29869
MM
ParticipantTo confirm. I have tested the API as they have suggested and it works well.
[code]
add_shortcode( ‘test_mailgun_api’, function(){
$apiKey = ‘f51eXXXXXXXXXXXXXXXXXXXX-d1a07e51-b785537c’;
$domain = ‘mg.domain.org’;
$from = ‘Excited User <[email protected]>’;
$to = ‘[email protected]’;
$to2 = ‘[email protected]’;
$subject = ‘Hello’;
$text = ‘Testing some Mailgun awesomeness!’;$url = “https://api.mailgun.net/v3/$domain/messages”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, ‘api:’ . $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
‘from’ => $from,
‘to’ => $to,
‘to’ => $to2,
‘subject’ => $subject,
‘text’ => $text,
]);$result = curl_exec($ch);
ob_start();
if (curl_errno($ch)) {
echo ‘Error:’ . curl_error($ch);
} else {
echo ‘Mail sent successfully’;
}curl_close($ch);
return ob_get_clean();
});
[/code] -
March 22, 2023 at 8:13 am #29872
vinny
KeymasterHi MM,
That response from support is not helpful. Please check the Mailgun logs the next time it fails for relevant information about the failures.
-
March 22, 2023 at 3:07 pm #29876
MM
ParticipantThat’s the problem. I don’t see any error details on the log. It just shows “Mailgun returned an error: ” plus there’s nothing shown in log at Mailgun dashboard.
-
-
AuthorPosts
- You must be logged in to reply to this topic.