So it's impossible to detect if a mail delivery was success. For example, if incorrect email address used
What is the expected result?
I want to use all accessable SwiftMailer features, particularly "failedRecipients" parameter to get a list of email addresses which delivery process failed. So I want to have a posibility to check not only send() method result but also an array of recipients who did not receive the message - via native SwiftMailer variable "failedRecipients"
What do you get instead?
Default mailer settings and simplified send() method works perfect if it's no nessessary to check email delivery. But in most cases it is not enough and misleading that the recipient has received a message. There are no other ways to check this at the program level
This issue has originally been reported by @mogilka at https://github.com/yiisoft/yii2/issues/15545. Moved here by @samdark.
Why Yii2 Mailer uses SwiftMailer but ignores its failed recipients feature?
What steps will reproduce the problem?
Swift_Mailer class method send($message, $failedRecipients = null) has two parameters: message (requires) and failedRecipients (not required)
But yii\swiftmailer\Mailer calls send() method without parameter failedRecipients:
$this->getSwiftMailer()->send($message->getSwiftMessage()) > 0;
So it's impossible to detect if a mail delivery was success. For example, if incorrect email address used
What is the expected result?
I want to use all accessable SwiftMailer features, particularly "failedRecipients" parameter to get a list of email addresses which delivery process failed. So I want to have a posibility to check not only send() method result but also an array of recipients who did not receive the message - via native SwiftMailer variable "failedRecipients"
What do you get instead?
Default mailer settings and simplified send() method works perfect if it's no nessessary to check email delivery. But in most cases it is not enough and misleading that the recipient has received a message. There are no other ways to check this at the program level
Additional info