You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.6 KiB

9 years ago
  1. =========
  2. Mailgun
  3. =========
  4. Installation
  5. ============
  6. * `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
  7. Configuration
  8. =============
  9. Mailgun-side
  10. ------------
  11. * register or log in http://mailgun.com
  12. * 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
  13. * 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 <https://help.mailgun.com/hc/en-us/articles/202052074-How-do-I-verify-my-domain->`__
  14. * if you are using your sandbox domain, add Authorized Recipient first (Sandbox domains are restricted to `authorized recipients <https://help.mailgun.com/hc/en-us/articles/217531258>`__ only)
  15. * create new Route
  16. * Open menu ``[[ Routes ]]``
  17. * Click ``[Create Route]`` button
  18. * **Expression Type** - ``Custom``
  19. * **Raw Expression** - ``match_recipient('.*@<your mail domain>')``
  20. * **Actions** - ``Store and notify``, ``http://<your odoo domain>/mailgun/notify``
  21. Odoo-side
  22. ---------
  23. * `Activate Developer Mode <https://odoo-development.readthedocs.io/en/latest/odoo/usage/debug-mode.html>`__
  24. * Configure **Outgoung mail server**
  25. * Open menu ``[[ Settings ]] >> Technical >> Email >> Outgoing Mail Servers``
  26. * Edit ``localhost`` record or create new one with the following:
  27. * **Description** - ``Mailgun``
  28. * **SMTP Server** - take from Mailgun **SMTP Hostname** (usually, it is ``smtp.mailgun.org``)
  29. * **Connection Security** - ``SSL/TLS``
  30. * **Username** - take from Mailgun **Default SMTP Login**
  31. * **Password** - take from Mailgun **Default Password**
  32. * Click ``[Test Connection]`` button to check the connection and then ``[Save]``
  33. * Configure **Incoming mail feature**
  34. * Configure catchall domain
  35. * Open menu ``Settings / General Settings``, check **External Email Servers** and edit **Alias Domain** - set it from Mailgun **Domain Name**
  36. * Click ``[Save]`` button
  37. * Set Mailgun API credentials
  38. * Open menu ``[[ Settings ]] >> Parameters >> System Parameters``
  39. * Create new parameter
  40. * key: ``mailgun.apikey``
  41. * Value: API Key from mailgun (``key-...``)
  42. * Click ``[Save]`` button
  43. * Configure mail aliases and emails for users
  44. * Open menu ``[[ Settings ]] >> Users >> Users``
  45. * Select the ``Administrator`` user (for example, you should configure all your users the same way but using different aliases) and click ``[Edit]``
  46. * On Preference tab edit **Alias** field - create new mail alias, e.g. ``admin@<you mail domain>`` with the following settings
  47. * **Alias Name** - ``admin``
  48. * **Aliased Model** - ``Users``
  49. * **Record Thread ID** - ``1``
  50. * **Default Values** - ``{}``
  51. * **Alias Contact** - ``Everyone``
  52. * **Security Owner** - ``Administrator``
  53. * **Parent Model** - Not set
  54. * **Parent Record Thread ID** - ``0``
  55. * 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
  56. Usage
  57. =====
  58. Outgoing
  59. --------
  60. * Open menu ``[[ Settings ]]>> Email >> Emails`` to create a message
  61. * Click ``[Send Now]`` button
  62. * RESULT: receive the message in your mail client (e.g. on gmail.com)
  63. Incoming
  64. --------
  65. * Create new message from your mail client to e.g. ``admin@<you mailgun domain>``
  66. * Open menu ``[[ Discuss ]]`` in Odoo
  67. * RESULT: See your message there