dobriyalji
Member
Hi Team,
How to Switch to PHP Mailer ?
How to Switch to PHP Mailer ?
Swiftmailer will stop being maintained at the end of November 2021.
Please, move to Symfony Mailer at your earliest convenience. Symfony Mailer is the next evolution of Swiftmailer. It provides the same features with support for modern PHP code and support for third-party providers.
[2022-01-25 21:13:01] - Processing the rest of 5 subscribers because of delivery server domain policies...
[2022-01-25 21:13:01] - Sorting the subscribers...
[2022-01-25 21:13:01] - Entering the foreach processing loop for all 5 subscribers...
[2022-01-25 21:13:01] - xxxxxxxx - 1/5
[2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx...
[2022-01-25 21:13:01] - xxxxxxxx - 2/5
[2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx...
[2022-01-25 21:13:01] - xxxxxxxx - 3/5
[2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx...
[2022-01-25 21:13:01] - xxxxxxxx - 4/5
[2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx...
[2022-01-25 21:13:01] - xxxxxxxx - 5/5
[2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx...
[2022-01-25 21:13:01] - Done processing 5 subscribers!
[2022-01-25 21:13:01] - Campaign has been marked as sent!
Check your delivery server domain policies and see if you can send to email address from your list.I have tested the new mailer but none email was sent and the campaign was wrongly marked as sent.
Yes, I could send through DS . If I switch to swiftmailer the email are sent , when I switch to symfony noCheck your delivery server domain policies and see if you can send to email address from your list.
Can you open support ticket and give us access credentials to your app ?Yes, I could send through DS . If I switch to swiftmailer the email are sent , when I switch to symfony no
It does work, indeed.in the last version released 2.1.3 symfony mailer is supposed to work or not ?
All these logs don't show any sending attempt, so I am with @laurentiu on this, it's something on ypur configuration, not with the mailer.[2022-01-25 21:13:01] - Processing the rest of 5 subscribers because of delivery server domain policies... [2022-01-25 21:13:01] - Sorting the subscribers... [2022-01-25 21:13:01] - Entering the foreach processing loop for all 5 subscribers... [2022-01-25 21:13:01] - xxxxxxxx - 1/5 [2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx... [2022-01-25 21:13:01] - xxxxxxxx - 2/5 [2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx... [2022-01-25 21:13:01] - xxxxxxxx - 3/5 [2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx... [2022-01-25 21:13:01] - xxxxxxxx - 4/5 [2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx... [2022-01-25 21:13:01] - xxxxxxxx - 5/5 [2022-01-25 21:13:01] - Checking if we can send to domain of xxxxxxxx... [2022-01-25 21:13:01] - Done processing 5 subscribers! [2022-01-25 21:13:01] - Campaign has been marked as sent!
Yii::app()->hooks->addFilter('mailer_after_create_message_instance', function($message, $params, $mailer) {
// make sure we get the right mailer and not phpmailer...
if (!($mailer instanceof MailerSwiftMailer) || !($message instanceof Swift_Message)) {
return $message;
}
// remove the header, it's been added before...
$message->getHeaders()->remove(sprintf('%sMailer', Yii::app()->params['email.custom.header.prefix']));
// add the new header with the value we want
$message->getHeaders()->addTextHeader(sprintf('%sMailer', Yii::app()->params['email.custom.header.prefix']), 'my_new_header');
// return the message in the end
return $message;
});