[ADD] mail_tracking_mailgun: manage failed state from mailgun

This change let odoo process a state sent from mailgun legacy webhooks
that seems to apply when the message is not sent because the related
email has been mark us as spam or have bounced before. For solve this
add two new states to _mailgun_event_type_mapping_mailgun_event_type_mapping
method:

* failed: Mailgun could not deliver the email to the recipient email server
* rejected: Mailgun rejected the request to send/forward the email

source in https://documentation.mailgun.com/en/latest/quickstart-events.html#events.
pull/514/head
Katherine Zaoral 2019-08-26 09:52:03 -03:00 committed by hveficent
parent b9182ec2b9
commit d32055946d
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ class MailTrackingEmail(models.Model):
'bounced': 'hard_bounce',
'dropped': 'reject',
'accepted': 'sent',
'failed': 'error',
'rejected': 'error',
}
def _mailgun_event_type_verify(self, event):