v 9.0 v 10.0 v 11.0 Third Party 1
Technical Name mailgun
LicenseSee License tab
Websitehttps://it-projects.info/team/iledarn
Also available in version v 10.0 v 9.0
You bought this module and need support? Click here!
Technical Name mailgun
LicenseSee License tab
Websitehttps://it-projects.info/team/iledarn
Also available in version v 10.0 v 9.0

Mailgun

Easy to setup the outgoing and incoming mail flow

The module provides Odoo and Mailgun integration to be able to easily configure Outgoing and Incoming mail flow.
From Mailgun side you get:
  • Powerful Sending Infrastructure
  • Intelligent Inbound Routing & Storage
  • Tracking and Analytics
  • Email Validation

Mailgun Configuration

Manage Domains

  • Create account on Mailgun service
  • Add domain in Domains menu
Note that the state of your domain should be Active to be able to use it from Odoo side. To verify it follow the instruction How do I verify my domain

Click on added domain name and see all the information needed to configure your Incoming and Outgoing mail feature.

If you use sandbox domain, add Authorized Recipient first (sandbox domains are restricted to authorized recipients)


Routes

Navigate to Routes menu and create a new route

Set the following fields and values:

  • Expression Type: Custom
  • Raw Expression: match_recipient('.*@your_mail_domain')
  • Actions:
    • Check the box Store and notify
    • Put there http://your_odoo_domain/mailgun/notify

Now everything is ready to move to Odoo configuration.

Odoo Configuration

Outgoing Mail Feature

At first, activate the developer mode. Then go to Settings → Technical → Email → Outgoing Mail Servers menu and populate the following fields:

  • Description - e.g. Mailgun
  • SMTP Server - smtp.mailgun.org
  • Connection Security - SSL/TLS
  • Username - use Default SMTP Login from mailgun
  • Password - use Default Password from mailgun
Once the fields are populated, click Test Connection button to check the connection to smtp server. If everything is ok, you can see popup message Connection Test Succeeded! Everything seems properly set up! and you are able to send messages now.

Incoming Mail Feature

Note that to setup incoming mailing, it is not required to setup Incoming Mail Server.
Open Settings → General Settings menu:

  • Check the box External Email Servers
  • Set as Alias Domain the domain name from Mailgun
Save the changes.

Setup mailgun API credentials in Settings → Parameters → System Parameters menu. Create new parameter:

  • Key - mailgun.apikey
  • Value - key-12345...

Now you can configure mail aliases for users. Go to Settings → Users menu and open user form (e.g. for Administrator). Then switch to Preferences tab and select an existing alias or create new one in the Alias field.

Open the user's related partner and set Email - the email is used for replying on user messages

Everything is done! It's time to send/receive email messages now!

Need our service?

Contact us by email or fill out request form

  • apps@it-projects.info
  • https://www.it-projects.info/page/website.contactus
  • https://m.me/itprojectsllc
  • skype@it-projects.info
Tested on Odoo
11.0 community
Tested on Odoo
11.0 enterprise

Mailgun

Installation

  • Install this module in a usual way

Configuration

Mailgun-side

  • register or log in http://mailgun.com
  • Open menu [[ Domains ]] and click on your domain, e.g. sandbox123*****.mailgun.org domain. Here you can see all the information needed to configure odoo outgoing mail feature
  • Please note that state of your domain should be Active before you can use it. If it is Unverified, verify it first using Mailgun FAQ - How do I verify my domain
  • if you are using your sandbox domain, add Authorized Recipient first (Sandbox domains are restricted to authorized recipients only)
  • create new Route
    • Open menu [[ Routes ]]
    • Click [Create Route] button
      • Expression Type - Custom
      • Raw Expression - match_recipient('.*@<your mail domain>')
      • Actions - Store and notify, http://<your odoo domain>/mailgun/notify

Odoo-side

  • Activate Developer Mode
  • Configure Outgoung mail server
    • Open menu [[ Settings ]] >> Technical >> Email >> Outgoing Mail Servers
    • Edit localhost record or create new one with the following:
      • Description - Mailgun
      • SMTP Server - take from Mailgun SMTP Hostname (usually, it is smtp.mailgun.org)
      • Connection Security - SSL/TLS
      • Username - take from Mailgun Default SMTP Login
      • Password - take from Mailgun Default Password
      • Click [Test Connection] button to check the connection and then [Save]
  • Configure Incoming mail feature
    • Configure catchall domain
      • Open menu Settings / General Settings, check External Email Servers and edit Alias Domain - set it from Mailgun Domain Name
      • Click [Save] button
    • Set Mailgun API credentials
      • Open menu [[ Settings ]] >> Parameters >> System Parameters
      • Create new parameter
        • key: mailgun.apikey
        • Value: API Key from mailgun (key-...)
        • Click [Save] button
    • Configure mail aliases and emails for users
      • Open menu [[ Settings ]] >> Users >> Users
      • Select the Administrator user (for example, you should configure all your users the same way but using different aliases) and click [Edit]
      • On Preference tab edit Alias field - create new mail alias, e.g. admin@<you mail domain> with the following settings
        • Alias Name - admin
        • Aliased Model - Users
        • Record Thread ID - 1
        • Default Values - {}
        • Alias Contact - Everyone
        • Security Owner - Administrator
        • Parent Model - Not set
        • Parent Record Thread ID - 0
      • Open user's Related Partner and edit Email field - usually it should be the same as mail alias name (admin@<you mailgun domain for Administrator) - this would be an address for replying user's messages

Usage

Outgoing

  • Open menu [[ Settings ]]>> Email >> Emails to create a message
  • Click [Send Now] button
  • RESULT: receive the message in your mail client (e.g. on gmail.com)

Incoming

  • Create new message from your mail client to e.g. admin@<you mailgun domain>
  • Open menu [[ Discuss ]] in Odoo
  • RESULT: See your message there
The MIT License (MIT)

Copyright 2020 IT-Projects Labs
Copyright 2015-2020 IT-Projects LLC
Copyright 2014-2015 Ivan Yelizariev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.