Browse Source

[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.
pull/351/head
David 6 years ago
committed by Jairo Llopis
parent
commit
2ab36728b5
  1. 2
      mail_tracking_mailgun/__manifest__.py
  2. 3
      mail_tracking_mailgun/models/res_partner.py

2
mail_tracking_mailgun/__manifest__.py

@ -6,7 +6,7 @@
{ {
"name": "Mail tracking for Mailgun", "name": "Mail tracking for Mailgun",
"summary": "Mail tracking and Mailgun webhooks integration", "summary": "Mail tracking and Mailgun webhooks integration",
"version": "11.0.1.1.0",
"version": "11.0.1.1.1",
"category": "Social Network", "category": "Social Network",
"website": "https://github.com/OCA/social", "website": "https://github.com/OCA/social",
"author": "Tecnativa, " "author": "Tecnativa, "

3
mail_tracking_mailgun/models/res_partner.py

@ -46,7 +46,8 @@ class ResPartner(models.Model):
' in order to be able to check mails validity')) ' in order to be able to check mails validity'))
for partner in self.filtered('email'): for partner in self.filtered('email'):
res = requests.get( res = requests.get(
"%s/address/validate" % api_url,
# Validation API url is always the same
'https://api.mailgun.net/v3/address/validate',
auth=("api", validation_key), params={ auth=("api", validation_key), params={
"address": partner.email, "address": partner.email,
"mailbox_verification": True, "mailbox_verification": True,

Loading…
Cancel
Save