Commit Graph

17 Commits (a8fe50b7733c64fd6ee9940a749eb99ffae58d5d)

Author SHA1 Message Date
David 8fab96ea88 [IMP] mail_tracking_mailgun: link to bounce event 2019-09-09 12:41:13 +02:00
Katherine Zaoral 573bc979b8 [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.
2019-08-30 12:21:55 +00:00
David 81d6e9b487 [FIX] mail_tracking_mailgun: permissions
- In v11 only admins can read from ir.config_parameter so a sudo() must
be made to be able to get a parameter.
2018-09-06 11:20:29 +02:00
David 2b9f7a96a6 [FIX] mail_tracking_mailgun: Validation API url
Besides Mailgun API url changes if the domain zone is in UE, it
remains the same for Validation API.
2018-08-22 16:58:14 +02:00
David 2a8cd575c9 [FIX] mail_tracking_mailgun: alternative domain
- In case the sending domain is different from the one configured in the
mail.domain.catchall setting.
2018-08-02 12:38:53 +02:00
Sergio Teruel Albert 0d24374876 [11.0][FIX] mail_tracking_mailgun: Read config parameters with sudo 2018-05-30 10:22:19 +02:00
David Vidal 9d5d1bcbbc [FIX] mail_tracking_mailgun: json.load() won't swallow bytes (#269)
- json.load() in python under 3.6 doesn't support binary input.
- https://docs.python.org/3/whatsnew/3.6.html#json
- This way, we let requests to decode the response itself.
2018-05-09 21:28:41 +02:00
David bf68b260a3 [MIG] mail_tracking_mailgun: Migration to 11.0 2018-05-08 18:26:49 +02:00
David 7f9dccdd05 [IMP] mail_tracking_mailgun: validation auto check
- Configurable partner email auto check.
2018-05-08 18:26:49 +02:00
David 92aeb61f39 [FIX] mail_tracking_mailgun: manual sync gets events from other recipients 2018-05-08 18:26:49 +02:00
Pedro M. Baeza 5aa0e87e34 [FIX] mail_tracking_mailgun: Message error on bounce 2018-05-08 18:26:49 +02:00
Jairo Llopis 54d9eb16a6 [FIX] mail_tracking_mailgun: Avoid errors without event
When this method is called without an event (a.k.a. `event=None`), this method produces the following error:

```
Traceback (most recent call last):
  File "/opt/odoo/auto/addons/mail/models/mail_mail.py", line 278, in send
    res = IrMailServer.send_email(msg, mail_server_id=mail.mail_server_id.id)
  File "/opt/odoo/auto/addons/mail_tracking/models/ir_mail_server.py", line 88, in send_email
    tracking_email.smtp_error(self, smtp_server_used, e)
  File "/opt/odoo/auto/addons/mail_tracking/models/mail_tracking_email.py", line 213, in smtp_error
    self.sudo()._partners_email_bounced_set('error')
  File "/opt/odoo/auto/addons/mail_tracking/models/mail_tracking_email.py", line 203, in
_partners_email_bounced_set
    ]).email_bounced_set(self, reason, event=event)
  File "/opt/odoo/auto/addons/mail_tracking_mailgun/models/res_partner.py", line 22, in
email_bounced_set
    self._email_bounced_set(reason, event)
  File "/opt/odoo/auto/addons/mail_tracking_mailgun/models/res_partner.py", line 33, in
_email_bounced_set
    event['Message-Id'] or '') TypeError: 'NoneType' object has no attribute '__getitem__'
```

So, we now assume we do not always have an event.
2018-05-08 18:26:49 +02:00
David 5d38ff8540 [10.0][FIX] mail_tracking_mailgun: Avoid key dict errors 2018-05-08 18:26:49 +02:00
David 2957581fdb [10.0][IMP] mail_tracking_mailgun: add partner mail checks 2018-05-08 18:26:49 +02:00
Damien Bouvy b4b899e373 [MIG] mail_tracking_mailgun: Migrated to 10.0 2018-05-08 16:39:07 +02:00
Antonio Espinosa 62a93e474b [8.0][IMP][mail_tracking] Speed installation time and discard concurrent events (#82)
[IMP] mail_tracking: Speed installation time, discard concurrent events and other fixes
2018-05-08 16:39:07 +02:00
Antonio Espinosa 6204b2bb3e [ADD] mail_tracking_mailgun 2018-05-08 16:39:07 +02:00