<commit_before>.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
   :alt: License: AGPL-3

=========================
Mail tracking for Mailgun
=========================

This module integrates mail_tracking events with Mailgun webhooks

Configuration
=============

You must configure Mailgun webhooks in order to receive mail events:
1. Got a Mailgun account and validate your sending domain
2. Go to Webhook tab and configure this URL for each event you want to track:

.. code:: html

   https://<your_domain>/mail/tracking/all/<your_database>

Replace '<your_domain>' by your Odoo install domain name
and '<your_database>' by your database name

In order to validate Mailgun webhooks you have to save Mailgun api_key in
a system parameter named 'mailgun.apikey'. You can find Mailgun api_key in your
validated sending domain

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
   :alt: Try me on Runbot
   :target: https://runbot.odoo-community.org/runbot/205/8.0


Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/social/issues>`_. In case of trouble, please<commit_msg>[IMP] mail_tracking_mailgun: Improve README<commit_after>.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
   :alt: License: AGPL-3

=========================
Mail tracking for Mailgun
=========================

This module integrates mail_tracking events with Mailgun webhooks.

Mailgun (https://www.mailgun.com/) is a service that provides an e-mail 
sending infrastructure through an SMTP server or via API. You can also 
query that API for seeing statistics of your sent e-mails, or provide 
hooks that processes the status changes in real time, which is the 
function used here.

Configuration
=============

You must configure Mailgun webhooks in order to receive mail events:

1. Got a Mailgun account and validate your sending domain.
2. Go to Webhook tab and configure this URL for each event you want to track:

.. code:: html

   https://<your_domain>/mail/tracking/all/<your_database>

Replace '<your_domain>' by your Odoo install domain name
and '<your_database>' by your database name.

In order to validate Mailgun webhooks you have to save Mailgun api_key in
a system parameter named 'mailgun.apikey'. You can find Mailgun api_key in your
validated sending domain.

Usage
=====

In your mail tracking status screens (explained on module *mail_tracking*), you will
see a more accurate information, like the 'Received' or 'Bounced' status, which are
not usually detected by normal SMTP servers.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
   :alt: Try me on Runbot
   :target: https://runbot.odoo-community.org/runbot/205/8.0

Known issues / Roadmap
======================

* There's no support for more than one Mailgun mail server.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/social/issues>`_. In case of trouble, please
{'fraction_non_alphanumeric': 0.13871173469387754, 'fraction_numerical': 0.01211734693877551, 'mean_word_length': 4.465156794425087, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 11, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1762806', 'n_tokens_mistral': 957, 'n_tokens_neox': 899, 'n_words': 349}