-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method for reset (restart) transport #8
Comments
Well, this package is almost framework-independent - shouldn't be hard to upgrade for multiple framework support ;) |
Rejected: this issue should be solved at |
@klimov-paul, my 2 cents: as we have discussed with SwiftMailer author, it should not automatically solve it, as auto-reset is out of project scope and is rather SMTP connection limitation (?). SwiftMailer is only a set of tools, not a framework. |
Well, I can say just the same about this extension. Auto-reset of the SMTP connection is risky, since the reson of its failure is unknown. The obvious solution for this problem will be extending public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
try {
parent::send($message, $failedRecipients);
} catch(\Exception $e) {
$this->restart();
$this->send($message, $failedRecipients);
}
} |
This extension simply do not have a proper place for such wrap. |
@klimov-paul Hi, Thanks for your help! Would you please tell me how exactly to fix this unusual problem in yii2-framework ? |
@desmondlee the solution is in the comment above. For further help, see below: |
Thank you for your question. We advise you to use our community driven resources: If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now. This is an automated comment, triggered by adding the label |
@cebe Thanks a lot! |
I'm using a worker for sending emails which work as a daemon and i noticed that daemon fails with an error when there is a long period between sending emails
I found the swiftmailer's issue about this problem: swiftmailer/swiftmailer#490
One guy implemented his own extension for laravel that has functional for auto reseting smtp connection.
You can find it here: https://github.com/YOzaz/Laravel-SwiftMailer/blob/master/src/YOzaz/LaravelSwiftmailer/Mailer.php#L128
I think we can implement same functionality for avoid such error
The text was updated successfully, but these errors were encountered: