Use mailgun for relaying emails.
This modules supports handling the webhook results from mailgun, when email is sent via mailgun as the relay.
If the webhook is configured then the email results from mailgun are reported back
to the Zotonic system. This is done by calling z_email_server:delivery_report/4,
the #email_failed notification, or m_email_status:mark_read/2
mod_mailgun integrates into the email status module, copying clear and block
actions to mailgun.
There are four configurarion keys:
mod_mailgun.api_urlendpoint for mailgun API requestsmod_mailgun.domaindomain as configured in mailgunmod_mailgun.api_keykey for signing API requestsmod_mailgun.webhook_secretkey for signing calls from mailgun to our webhook
Besides this the relay options for email sending need to be configured.
These can be configured in the admin via System > Mail settings. There will be an additional panel to provide the Mailgun configurations.
Mailgun reports sending progress back to a webhook.
The webhook, to be configured at mailgun, is at: /mailgun-webhook
The config key mod_mailgun.webhook_secret MUST be configured for this to work.
If mailgun reports that the email is sent to the next MTA then in the email log it is shown as relayed.
This module needs mod_email_status.