How to Add PHP-Mailer in Mailwizz 2.0 ?

We removed PHPMailer in MailWizz 2.x and we have no plans to add it again, SwiftMailer is much more flexible and compliant, there is no reason to use PHPMailer when SwiftMailer is available.
 
@zhu4koff - swiftmailer is touring complete, there's literally nothing else to be added to it.
We will transition to the new mailer in time, it will take quite a bit because we need to do a lot of tests, and when it will be done, it will be probably included as an option together with swiftmailer, like we did with phpmailer, then at some point remove swiftmailer, just like we did with PHPMailer.
 
hi @twisted1919 , in the last version released 2.1.3 symfony mailer is supposed to work or not ? I have tested the new mailer but none email was sent and the campaign was wrongly marked as sent.

Below the debug log

Code:
[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!
 
I have tested the new mailer but none email was sent and the campaign was wrongly marked as sent.
Check your delivery server domain policies and see if you can send to email address from your list.
 
in the last version released 2.1.3 symfony mailer is supposed to work or not ?
It does work, indeed.
[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!
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.
 
ok, I found my issue.
With swift mailer I have a custom init file ( init-custom.php ) with this code for the X-Mailer header

Removing the init-custom.php file solved my issue and Symfony now work .

Code:
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;
});
 
Back
Top