mirror of https://github.com/OCA/social.git
[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
parent
8c9cad1dbe
commit
2ab36728b5
|
@ -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, "
|
||||||
|
|
|
@ -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…
Reference in New Issue