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.

121 lines
4.5 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :alt: License: AGPL-3
  3. ==================================
  4. SendGrid Mail Sending and Tracking
  5. ==================================
  6. This module integrates
  7. `SendGrid <https://sendgrid.com/>`_ with Odoo. It can send transactional emails
  8. through SendGrid, using templates defined on the
  9. `SendGrid web interface <https://sendgrid.com/templates>`_. It also supports
  10. substitution of placeholder variables in these templates. The list of available
  11. templates can be fetched automatically.
  12. E-mails sent through SendGrid will be tracked using Sendgrid Webhook Events.
  13. Installation
  14. ============
  15. You need to install python-sendgrid v3 API in order to install the module.
  16. If you're using a multi-database installation (with or without dbfilter option)
  17. where /web/databse/selector returns a list of more than one database, then
  18. you need to add ``mail_sendgrid`` addon to wide load addons list
  19. (by default, only ``web`` addon), setting ``--load`` option.
  20. For example, ``--load=web,mail_tracking,mail_sendgrid``
  21. Configuration
  22. =============
  23. You can add the following system parameters to configure the usage of SendGrid:
  24. * ``mail_sendgrid.substitution_prefix`` Any symbol or character used as a
  25. prefix for `SendGrid Substitution Tags <https://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html>`_.
  26. ``{`` is used by default.
  27. * ``mail_sendgrid.substitution_suffix`` Any symbol or character used as a
  28. suffix for SendGrid Substitution Tags.
  29. ``}`` is used by default.
  30. * ``mail_sendgrid.send_method`` Use value 'sendgrid' to override the traditional SMTP server used to send e-mails with sendgrid.
  31. By default, SendGrid will co-exist with traditional system
  32. (two buttons for sending either normally or with SendGrid).
  33. In order to use this module, the following variables have to be defined in the
  34. server command-line options (or in a configuration file):
  35. - ``sendgrid_api_key`` A valid API key obtained from the
  36. SendGrid web interface <https://app.sendgrid.com/settings/api_keys> with
  37. full access for the ``Mail Send`` permission and read access for the
  38. ``Template Engine`` permission.
  39. Optionally, the following configuration variables can be set as well:
  40. - ``sendgrid_test_address`` Destination email address for testing purposes.
  41. You can use ``odoo@sink.sendgrid.net``, which is an address that
  42. will simply receive and discard all incoming email.
  43. For tracking events to work, make sure you configure your Sendgrid Account with the correct Event Notification Url.
  44. You can do it under 'Settings -> Mail Settings -> Event Notification '.
  45. Set the URL to ``https://<your_domain>/mail/tracking/sendgrid/<your_database>``
  46. Replace '<your_domain>' with your Odoo install domain name
  47. and '<your_database>' with your database name.
  48. Usage
  49. =====
  50. If you designed templates in Sendgrid that you wan't to use with Odoo:
  51. * Go to 'Settings -> Email -> SendGrid Templates'
  52. * Create a new Template
  53. * Click the "Update" button : this will automatically import all your templates
  54. In e-mail templates 'Settings -> Email -> Templates', you can attach a SendGrid template for any language.
  55. You can substitute Sendgrid keywords with placeholders or static text like in the body of the e-mail.
  56. The preview wizard now renders your e-mail with the SendGrid template applied.
  57. From e-mails, use the "Send (SendGrid)" button to send the e-mail using Sendgrid.
  58. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  59. :alt: Try me on Runbot
  60. :target: https://runbot.odoo-community.org/runbot/205/10.0
  61. Known issues / Roadmap
  62. ======================
  63. * Extend the features from SendGrid
  64. Bug Tracker
  65. ===========
  66. Bugs are tracked on `GitHub Issues
  67. <https://github.com/OCA/social/issues>`_. In case of trouble, please
  68. check there if your issue has already been reported. If you spotted it first,
  69. help us smashing it by providing a detailed and welcomed feedback.
  70. Credits
  71. =======
  72. Images
  73. ------
  74. * Sengrid logo: `SVG Icon <http://seeklogo.com/vector-logo/289294/sendgrid>`_.
  75. Contributors
  76. ------------
  77. * Emanuel Cino <ecino@compassion.ch>
  78. * Roman Zoller <rzcomp@gmail.com>
  79. * Isaac Gallart <igallart@puntsistemes.es>
  80. Maintainer
  81. ----------
  82. .. image:: https://odoo-community.org/logo.png
  83. :alt: Odoo Community Association
  84. :target: https://odoo-community.org
  85. This module is maintained by the OCA.
  86. OCA, or the Odoo Community Association, is a nonprofit organization whose
  87. mission is to support the collaborative development of Odoo features and
  88. promote its widespread use.
  89. To contribute to this module, please visit http://odoo-community.org.