You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Olivier Sarrat edited this page Feb 15, 2018
·
2 revisions
This Groupe URD odoo-addons Wiki is used only to keep trace on some ideas or useful chunks of code.
Enable test-mode on Mailgun
In order to enable Mailgun testmode, a MIME header must be added. The following diff shows the modification to be made on addons/mail/mail_mail.py
--- mail_mail.py 2018-02-14 12:58:39.116349729 +0100
+++ mail_mail.py.bakWithMailgunTestMode 2018-02-14 12:58:20.416349729 +0100
@@ -275,6 +275,7 @@
headers.update(eval(mail.headers))
except Exception:
pass
+ headers['X-Mailgun-Drop-Message'] = 'yes' #Add specific Mailgun MIME header for test mode
# Writing on the mail object may fail (e.g. lock on user) which
# would trigger a rollback *after* actually sending the email.