Closed alexanderloewe closed 7 months ago
The sendout process is only stopped if the email delivery service rejects the API call, not if an email bounces. This can be caused by throttling, downtime, or any other factor that causes the email delivery service to return an error. Stopping the sendout process is much safer than proceeding while the API endpoint is failing.
What might be happening is that the email delivery service you are using is rejecting messages to email addresses that have previously bounced. If that is the case, first make sure you have correctly set up bounce and complaint handling, then export all bounced/complained email addresses from the email delivery service and check them against the contacts in the Campaign plugin (or import them into Campaign as “unsubscribed”).
An additional step you can take is to increase the maximum number of failed attempts to send to contacts that are allowed before failing the entire sendout, using the maxSendFailuresAllowed
config setting.
What we had observed is that various e-mail inboxes were rejected by provider Postmark. We then had to remove all these e-mails individually from the contacts according to the Campaign log. The process took hours because we had to run the campaign again each time. However, these e-mail addresses did not unsubscribe from our list beforehand.
Sending via a separate SMPT mailbox also led to the same error.
Out of 1800 addresses, Campaign stopped 86 times.
Is there no better way to proceed in such cases?
Ideally you would begin with a clean mailing list. If you have known invalid email addresses, you can unsubscribe them from the list using the import function as follows.
If they are not known, then Postmark should not be rejecting them. Instead, I’d expect Postmark to make a webhook request with a bounce event that Campaign can gracefully handle.
Bug Report
I am facing the following time-consuming problem:
The sending process is aborted by the plug-in if emails bounce during sending (soft as well as hard) or if the email gateway rejects the sending. You then have to check the log to see which e-mail address the dispatch has bounced to. The e-mail address must then be removed from the dispatch manually (unsubscribe or delete the address from the database). Next, the failed dispatch must be restarted. This process must be carried out every time an e-mail bounces.
Can you customize the script so that the plug-in continues sending after a bounce and the bounced e-mail addresses are recorded in a table? This means that if an e-mail address bounces more than 3 times, then this address is skipped and the dispatch is automatically continued until the dispatch is completed.
The way the software works now, it is almost impossible to send newsletters to higher numbers of recipients. With around 5000 e-mail addresses, you would otherwise have to spend ages doing manual work.
Plugin Version
2.11.0
Craft CMS Version
4.8.7
PHP Version
8.1