Skip to content

Exception while flushing email queue #1

@rbsmidt

Description

@rbsmidt

Hi AccordGroup.

I am using your bundle i na Symfony3 app, and am experiencing some exceptions, when trying to send batches of emails. I'm not quite sure if the issue is in relation to your bundle or the Swift Mailer bundle itself. If i'm posting this in the wrong place, please let me know.

So back to the issue. I'm trying to send a biweekly wrap up to each of my users, but only 20-30% of the emails are actually shipped to Postmark. In my logfiles i see the following error:

Exception occurred while flushing email queue: Postmark delivery failed: You tried to send to a recipient that has been marked as inactive. Found inactive addresses: <email@address.com>. Inactive recipients are ones that have generated a hard bounce or a spam complaint.

In Postmark i spotted 9 inactive addresses, but the above error is only written to my log file once during a batch email send. I've been looking through the code in SwiftMailer and your bundle, and spotted the error message related to queue flushing in SwiftMailer's EmailSenderListener.php related to spooling.

I guess the exception is expected behaviour from Postmarks part. It seems that the reason error is only written once in my logs, is because Swift Mailer does some automatic spooling, when sending a lot of emails, and the command is stopped after the first spool is returned with an exception.
If i try to reproduce on a local dev env, i can reproduce the error, if i add a user with an invalid email. However all emails are delivered fine. I think this is due to the fact, that my local env has about 10 users, where the actual app has about 1000 users. SwiftMailer must do some internal batching of the emails?

So my actual question is: Do you guys have a way to handle these inactive addresses through your bundle? I'm basically looking for a way to either re-activate emails through Postmark API, or receive a list of bounced emails from Postmark API and deactivate biweekly wrap ups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions