Skip to content
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

[14.0][FIX] mail_tracking_mass_mailing: Set traces in error according to tracking #908

Commits on May 16, 2022

  1. mail_tracking_mass_mailing: Set traces in error according to tracking

    If an exception is caught by ir.mail_server.send_email in mail_tracking module,
    the mail.tracking.email record will appear in error but the related mailing
    trace would still appear as sent because mail.mail._postprocess_sent_message is
    called without any failure_type in mail.mail._send in the mail module (as Exception
    is not raised after being caught in mail_tracking module).
    
    Since _postprocess_sent_message method not only sets the mailing.trace state in
    mass_mailing module but can also delete the mail.mail records in mail module,
    we need to ensure the mailing.trace is written accordingly to the tracking here,
    and avoid having the mass_mailing module set a 'sent' status if we had an exception,
    hence the usage of a context key to ignore possible writes.
    grindtildeath committed May 16, 2022
    Configuration menu
    Copy the full SHA
    aafa417 View commit details
    Browse the repository at this point in the history