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/101/merge
David 6 years ago
committed by Pedro M. Baeza
parent
commit
2375278335
  1. 2
      mail_tracking_mailgun/__manifest__.py
  2. 3
      mail_tracking_mailgun/models/res_partner.py

2
mail_tracking_mailgun/__manifest__.py

@ -7,7 +7,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": "10.0.1.2.0",
"version": "10.0.1.2.1",
"category": "Social Network", "category": "Social Network",
"website": "https://odoo-community.org/", "website": "https://odoo-community.org/",
"author": "Tecnativa, " "author": "Tecnativa, "

3
mail_tracking_mailgun/models/res_partner.py

@ -47,7 +47,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