diff --git a/content/applications/general/email_communication/email_template.rst b/content/applications/general/email_communication/email_template.rst index f73fac16f..1c6e4596b 100644 --- a/content/applications/general/email_communication/email_template.rst +++ b/content/applications/general/email_communication/email_template.rst @@ -1,98 +1,278 @@ =============== -Email Templates +Email templates =============== -We all know writing good emails is vital to get a high response rate, but you do not want to -rewrite the same structure every time, do you? That is where email templates come in. -Without the need to rewrite the entire email structure every time, you save time to focus on -the content. Multiple templates also let you deliver the right message to the right audience, -improving their overall experience with the company. +Email templates are saved emails that are used repeatedly to send emails from the database. They +allow users to send quality communications, without having to compose the same text repeatedly. + +Creating different templates that are tailored to specific situations lets users choose the right +message for the right audience. This increases the quality of the message and the overall +engagement rate with the customer. .. note:: - The email templates use QWeb. The composer allows you to edit emails in their final rendering, - making customizations more robust as you don’t have to edit code. + Email templates in Odoo use QWeb or XML, which allows for editing emails in their final + rendering, making customizations more robust, without having to edit any code whatsoever. This + means that Odoo can use a Graphical User Interface (GUI) to edit emails, which edits the backend + code. When the received email is read by the end user's program different formatting and graphics + will appear in the final form of it. -Defining a default reply to on your mail template -================================================= +Access email templates in :ref:`developer mode ` by navigating to +:menuselection:`Settings app --> Technical menu --> Email --> Email Templates`. -Although the field *reply to* is available within the mail templates, **this field is only used -for mass mailing** mode (this means when sending templates on what we call bulk emailing). You -can send emails in bulk in almost every app that has a list view. Select the records you want -and click on the action button. If you have an option to send an email, you will see a mail -composer with possible values to define: +Editing email templates +======================= -.. image:: email_template/composer-mass-mailing-quotations.png +The *powerbox* feature can be used when working with email templates. This feature provides the +ability to directly edit the formatting and text in an email template, as well as the ability to add +links, buttons, appointment options, or images. + +Additionally, the XML/HTML code of the email template can be edited directly, via the +:guilabel:`` icon. + +*Dynamic placeholders* (text that references fields within Odoo to auto-fill information on the +template) are available for the :guilabel:`Email Configuration` fields, the :guilabel:`Subject`, and +the :guilabel:`Language`. + +Powerbox +-------- + +The *powerbox* feature is an enriched text editor with various formatting, layout, and text options. +It can also be used to add XML/HTML features in an email template. The powerbox feature is activated +by typing a forward slash `/` in the body of the email template. + +When a forward slash `/` is typed in the body of an email template, a drop-down menu appears with +the following options: + +:guilabel:`Basic Blocks` + +- :guilabel:`Heading 1`: Big section heading. +- :guilabel:`Heading 2`: Medium section heading. +- :guilabel:`Heading 3`: Small section heading. +- :guilabel:`Text`: Paragraph block. +- :guilabel:`Bulleted list`: Create a simple bulleted list. +- :guilabel:`Numbered list`: Create a list with numbering. +- :guilabel:`Checklist`: Track tasks with a checklist. +- :guilabel:`Table`: Insert a table. +- :guilabel:`Switch direction`: Switch the text's direction. +- :guilabel:`Separator`: Insert a horizontal rule separator. +- :guilabel:`Quote`: Add a blockquote section. +- :guilabel:`Code`: Add a code section. +- :guilabel:`Appointment`: Add a specific appointment. +- :guilabel:`Calendar`: Schedule an appointment. + +:guilabel:`Navigation` + +- :guilabel:`Link`: Add a link. +- :guilabel:`Button`: Add a button. + +:guilabel:`Medias` + +- :guilabel:`Image`: Insert an image. + +.. tip:: + To use any of these options, click on the desired feature from the powerbox drop-down menu. To + format existing text with a text-related option (e.g. :guilabel:`Heading 1`, :guilabel:`Switch + direction`, etc.), highlight the text, then type in the activator key (forward slash) `/`, and + select the desired option from the drop-down menu. + + .. image:: email_template/powerbox-feature.png + :align: center + :alt: Powerbox feature in the email template. + +XML/HTML code editor +-------------------- + +To access the XML/HTML editor for an email template, first enter :ref:`developer mode +`. Then, click the :guilabel:`` icon in the upper-right corner of the template, +and proceed to edit the XML/HTML. To return to the standard text editor, click the :guilabel:`` +icon again. + +.. image:: email_template/html-code-editor.png :align: center - :alt: Composer in mass mailing mode after selecting multiple quotations. + :alt: HTML editor in the email template. -You can also define them by default on the template: +.. warning:: + The XML/HTML editor should be accessed with caution as this is the backend code of the template. + Editing the code can cause the email template to break immediately or when upgrading the + database. + +Dynamic placeholders +-------------------- + +*Dynamic placeholders* reference certain fields within the Odoo database to produce unique data in +the email template. + +.. example:: + Many companies like to customize their emails with a personalized piece of customer information + to grab attention. This can be accomplished in Odoo by referencing a field within a model by + inserting a dynamic placeholder. For example, a customer's name can be referenced in the email + from the :guilabel:`Customer` field on the :guilabel:`Sales Order` model. The dynamic placeholder + for this field is: `{{ object.partner_id }}`. + +Dynamic placeholders are encoded to display fields from within the database. Dynamic placeholders +can **only** be used in the fields present in the :guilabel:`Email Configuration` tab, the +:guilabel:`Subject` of the email, and the :guilabel:`Language`. + +Dynamic placeholders can be used with the following fields on an email template: + +- :guilabel:`Subject` (:guilabel:`Content` tab) +- :guilabel:`From` (:guilabel:`Email Configuration` tab) +- :guilabel:`To (Emails)` (:guilabel:`Email Configuration` tab) +- :guilabel:`To (Partners)` (:guilabel:`Email Configuration` tab) +- :guilabel:`CC` (:guilabel:`Email Configuration` tab) +- :guilabel:`Reply-To` (:guilabel:`Email Configuration` tab) +- :guilabel:`Language` (:guilabel:`Advanced Settings` tab) + +The :guilabel:`Dynamic Placeholder Generator`, which is the last tab on the email template, creates +placeholders for the aforementioned fields. Dynamic placeholders may also be inserted in the HTML +code, but this task is out of the scope of Odoo Support. + +To use the *Dynamic Placeholder Generator*, navigate to the :guilabel:`Dynamic Placeholder +Generator` tab. Select the field that the dynamic placeholder should reference using the +:guilabel:`Field` drop-down menu. Should a :guilabel:`Sub-Model` or :guilabel:`Sub-Field` need to be +specified, set those by selecting the corresponding drop-down menu. These fields should be set +automatically after setting the :guilabel:`Field`, although in some instances these fields will +remain empty. The dynamic placeholder will appear in the :guilabel:`Placeholder Expression` field. +Copy and paste the placeholder expression into the appropriate field in the tabs of the email +template, as listed in the bulleted list above. + +.. note:: + Each unique combination of :guilabel:`Fields`, :guilabel:`Sub-models` and :guilabel:`Sub-fields` + creates a different dynamic placeholder. Imagine it as a combination to the field that is being + created. + + To search the available fields, simply click the drop-down menu next to :guilabel:`Field` and + select one, or click :guilabel:`Search More` to select from all of the available fields for the + model that the email template is created for. + + .. seealso:: + :doc:`../../productivity/studio/models_modules_apps`. + +.. tip:: + These fields can also be accessed in :ref:`developer mode `. On a contact form + (or other relevant form in Odoo), navigate to the information that should be referenced in the + dynamic placeholder, and hover over the field name. A box of backend information will reveal + itself with the specific Odoo :guilabel:`Field` name in the backend. Search for this field in the + :guilabel:`Field` drop-down menu in the email template. + + .. image:: email_template/information-box.png + :align: center + :alt: Backend information box of fields on a model. + +.. seealso:: + :ref:`Views and fields in the developer documentation `. + +.. warning:: + Customizing email templates are out of the scope of Odoo Support. + +Default reply on email templates +-------------------------------- + +Under the :guilabel:`Email Configuration` tab on an email template, there is a :guilabel:`Reply To` +field. In this field, add email addresses to which replies are redirected when sending emails en +masse using this template. + +.. tip:: + A Add multiple email addresses by adding a comma `,` between the addresses or dynamic + placeholders. .. image:: email_template/reply-to-template-sales.png :align: center :alt: Reply-to field on template. -Because of this, setting a value in this field is useless as the value defined will be totally -ignored. The default *reply-to* value is the default catchall email address to ensure a -communication between your customer and your Odoo database. For more information about the way -the catchall works, please check :ref:`how to manage inbound messages `. +The :guilabel:`Reply To` field is **only** used for mass mailing (sending emails in bulk). Bulk +emails can be sent in almost every Odoo application that has a list view option. -Transactional emails and corresponding URL for each company -=========================================================== +To send mass mails, while in :guilabel:`list` view, check the boxes next to the desired records +where the emails are to be sent, click the :guilabel:`Action` button (represented by a :guilabel:`⚙️ +(gear)` icon), and select the desired email option from the :guilabel:`Action` drop-down menu. Email +options can vary by the particular list view and application. -When using Odoo, multiple events trigger the sending of automated emails. These emails are known -as transactional emails and sometimes contain links pointing to your Odoo database. +If it is possible to send an email, a mail composer pop-up window appears, with values that can be +defined and customized. This option will be available on the :guilabel:`Action` button on pages +where emails can be sent in bulk---for example, on the :guilabel:`Customers` page of the CRM app. +This action occurs throughout the Odoo database. -By default, links generated by the database use the dynamic web.base.url key defined in the system -parameters. More information about this :ref:`parameter `. +.. image:: email_template/composer-mass-mailing.png + :align: center + :alt: Email composer in mass mailing mode with reply-to highlighted. -If the website application isn't installed, the web.base.url key will always be the default +Transactional emails and corresponding URLs +=========================================== + +In Odoo, multiple events can trigger the sending of automated emails. These emails are known as +*transactional emails*, and sometimes contain links redirecting to the Odoo database. + +By default, links generated by the database use the dynamic `web.base.url` key defined in the system +parameters. For more information about this, see :ref:`system parameters +`. + +If the *Website* application is not installed, the `web.base.url` key will always be the default parameter used to generate all the links. -It’s important to know that this key can only have a single value, meaning that in a -multi-website/company database environment, even if you have a specific domain name for each -website, the links generated to share a document or within a transactional email might remain the -same, whatever the website/company related to the sending of the email/document. +.. important:: + The `web.base.url` key can only have a single value, meaning that, in a multi-website or + multi-company database environment, even if there is a specific domain name for each website, the + links generated to share a document (or the links within a transactional email) may remain the + same, regardless of which website/company is related to the sending of the email/document. -This is not always the case as some Odoo applications have a link established in the database with -the website application, meaning that in this case, if a specific domain is defined for the -websites, the URL generated in the email template will use the domain defined on the corresponding -website of the company. + .. example:: + If the :guilabel:`Value` of the :guilabel:`web.base.url` system parameter is equal to + `https://www.mycompany.com` and there are two separate companies in Odoo with different + website URLs: `https://www.mycompany2.com` and `https://www.mycompany1.com`, the links created + by Odoo to share a document, or send a transactional email, come from the domain: + `https://www.mycompany.com`, regardless of which company sends the document or email. -.. caution:: - A document shared using the documents application will always use the web.base.url key, as the - document shared isn't associated with any particular website. Meaning that the URL will always be - the same (the web.base.url key value), whatever the company it's shared from, this is a known - limitation! + This is not always the case, as some Odoo applications (*eCommerce*, for example) have a link + established in the database with the *Website* application. In that case, if a specific domain is + defined for the website, the URL generated in the email template uses the domain defined on the + corresponding website of the company. -On the other hand, sales orders made by a customer on one of your Odoo e-commerce websites have a -link established with the website from which the order was made. As a result, the e-mail sent for -the sales orders uses the domain name defined for the corresponding website to generate the links. + .. example:: + When a customer makes a purchase on an Odoo *eCommerce* website, the order has an established + link with that website. As a result, the links in the confirmation email sent to the customer + use the domain name for that specific website. -For more information about how to configure your domains, we invite you to check :doc:`our domain name -documentation `. +.. note:: + A document shared using the *Documents* application will **always** use the `web.base.url` key, + as the document shared is not associated with any particular website. This means that the URL + will always be the same (the `web.base.url` key value), no matter what company it's shared from. + This is a known limitation. + +For more information about how to configure domains, check out the :doc:`domain name documentation +`. Updating translations within email templates -------------------------------------------- -Email templates are automatically translated. Changing the translations shouldn’t be necessary. -However, if for a specific reason you’d like to change some of the translations, this can be done. +In Odoo, email templates are automatically translated for all users in the database for all of the +languages installed. Changing the translations shouldn't be necessary. However, if for a specific +reason, some of the translations need to be changed, it can be done. -Like any modification in the code, keep in mind that modifications that aren’t done correctly (for -example modifications leading to bad syntax) can break the template, as a result, the template -will appear blank. +.. warning:: + Like any modification in the code, if translation changes are not done correctly (for example, + modifications leading to bad syntax), it can break the template, and as a result, the template + will appear blank. -In order to edit your translations, follow these steps from the template. +In order to edit translations, first enter :ref:`developer mode `. Then, on the +email template, click on the :guilabel:`Edit` button, and then click on the language button, +represented by the initials of the language currently being used (e.g. :guilabel:`EN` for English). -#. Click on the edit button, then on the language button +.. image:: email_template/edit-language-template.png + :align: center + :alt: Edit the language of a template. - .. image:: email_template/edit-language-template.png - :align: left - :alt: Edit the language of a template +.. note:: + If there aren't multiple languages installed and activated in the database, or if the user does + not have administration access rights, the language button will not appear. -#. A pop-up window with the different languages installed on the database will be displayed. From - here, editing the translations will be possible. Don't forget to hit the save button to preserve - your changes. +A pop-up window with the different languages installed on the database appears. From this pop-up, +editing of translations is possible. When the desired changes have been made, click the +:guilabel:`Save` button to save the changes. - .. image:: email_template/translation-body.png - :align: left - :alt: Translation of the body of the Application template in the different languages installed. +.. image:: email_template/translation-body.png + :align: center + :alt: Translation of the body of the Appointment Booked template. + +.. note:: + When editing the translations, the default language set in the database appears in **bold**. diff --git a/content/applications/general/email_communication/email_template/composer-mass-mailing-quotations.png b/content/applications/general/email_communication/email_template/composer-mass-mailing-quotations.png deleted file mode 100644 index e20c405da..000000000 Binary files a/content/applications/general/email_communication/email_template/composer-mass-mailing-quotations.png and /dev/null differ diff --git a/content/applications/general/email_communication/email_template/composer-mass-mailing.png b/content/applications/general/email_communication/email_template/composer-mass-mailing.png new file mode 100644 index 000000000..34c354d4a Binary files /dev/null and b/content/applications/general/email_communication/email_template/composer-mass-mailing.png differ diff --git a/content/applications/general/email_communication/email_template/edit-language-template.png b/content/applications/general/email_communication/email_template/edit-language-template.png index 9ef73b177..263fe7ed6 100644 Binary files a/content/applications/general/email_communication/email_template/edit-language-template.png and b/content/applications/general/email_communication/email_template/edit-language-template.png differ diff --git a/content/applications/general/email_communication/email_template/html-code-editor.png b/content/applications/general/email_communication/email_template/html-code-editor.png new file mode 100644 index 000000000..f5b1ceeaf Binary files /dev/null and b/content/applications/general/email_communication/email_template/html-code-editor.png differ diff --git a/content/applications/general/email_communication/email_template/information-box.png b/content/applications/general/email_communication/email_template/information-box.png new file mode 100644 index 000000000..e06f0fdc7 Binary files /dev/null and b/content/applications/general/email_communication/email_template/information-box.png differ diff --git a/content/applications/general/email_communication/email_template/powerbox-feature.png b/content/applications/general/email_communication/email_template/powerbox-feature.png new file mode 100644 index 000000000..6f9fa6ebc Binary files /dev/null and b/content/applications/general/email_communication/email_template/powerbox-feature.png differ diff --git a/content/applications/general/email_communication/email_template/reply-to-template-sales.png b/content/applications/general/email_communication/email_template/reply-to-template-sales.png index 965ddbba3..d931e53f4 100644 Binary files a/content/applications/general/email_communication/email_template/reply-to-template-sales.png and b/content/applications/general/email_communication/email_template/reply-to-template-sales.png differ diff --git a/content/applications/general/email_communication/email_template/translation-body.png b/content/applications/general/email_communication/email_template/translation-body.png index 94ba93047..bb02e9b5d 100644 Binary files a/content/applications/general/email_communication/email_template/translation-body.png and b/content/applications/general/email_communication/email_template/translation-body.png differ diff --git a/content/applications/general/email_communication/faq.rst b/content/applications/general/email_communication/faq.rst index a866513d4..32a435ed9 100644 --- a/content/applications/general/email_communication/faq.rst +++ b/content/applications/general/email_communication/faq.rst @@ -1,173 +1,231 @@ -=== -FAQ -=== +============ +Email issues +============ -This document contains an explanation of the most recurring mailing concerns. - -We will start by addressing issues of outgoing emails (ex: my client has not received my email), -and then, of incoming emails (ex: I do not receive responses from my customers in the database). +This document contains an explanation of the most recurring emailing issues in Odoo. Outgoing emails =============== .. _red_envelop: -What do you have to check if your email is not sent? ----------------------------------------------------- +Email is not sent +----------------- -The first indicator showing you that the email has not been sent is the red envelope next to the -date and time of the message. +The first indicator showing that an email has not been sent is the presence of a red :guilabel:`✉️ +(envelope)` icon, next to the date and time of the message, located in the chatter. .. image:: faq/red-envelop.png :align: center - :alt: Red envelope displayed in chatter + :alt: Red envelope icon displayed in chatter. + +Unsent emails also appear in the Odoo email queue. In :ref:`developer mode `, the +email queue can be accessed by going to :menuselection:`Settings app --> Technical menu --> Email +--> Emails`. Unsent emails appear in turquoise, while sent emails appear in grey. Common error messages ~~~~~~~~~~~~~~~~~~~~~ .. _email_communication/daily_limit_mail: -You reached your daily limit: -***************************** +Daily limit reached +******************* .. image:: faq/email-limit.png :align: center - :alt: Warning in Odoo upon email limit reached + :alt: Warning in Odoo upon email limit reached. -Each email service provider has its own email sending limits. The limits may be daily, hourly, -and sometimes even per minute. This is the same for Odoo, we have to limit our customers to prevent -our e-mail servers from being blacklisted. +Each email service provider has its own email sending limits. The limits may be daily, hourly, or +sometimes, per minute. This is the same for Odoo, which limits a customer's sending to prevent +Odoo's email servers from being blacklisted. Here are the default limits for new databases: -- 200 emails/day for Odoo Online and Odoo.sh databases with an active subscription, -- 20 emails/day for one-app free databases, -- 50 emails/day for trial databases, -- in case of migration, your daily limit might be reset to 50 emails a day. +- **200 emails per day** for Odoo Online and Odoo.sh databases with an active subscription. +- **20 emails per day** for one-app free databases. +- **50 emails per day** for trial databases. +- In the case of migration, the daily limit might be reset to 50 emails per day. -In case you hit the limit, you can: +If the daily limit is reached: -- Ask our support team to increase your daily limit. We will analyze the situation of your database - depending on (non-exhaustive list): +- Contact the Odoo support team, who may increase the daily limit depending on the following + factors: - - How many users in your database, - - Which apps are installed, - - Your bounce rate: the percentage of email addresses that did not receive your emails because - it was returned by a mail server on its way to the final recipient. You can contact the `support - `_. + #. How many users are in the database? + #. Which apps are installed? + #. The bounce rate: the percentage of email addresses that did not receive emails because they + were returned by a mail server on its way to the final recipient. -- Use your own outgoing email server to be independent of Odoo’s mail limit (please refer - to :doc:`the corresponding documentation `), -- Wait until 11pm UTC for the reset and click on the retry button: The :ref:`Developer mode ` - must be activated. Then, go to :menuselection:`Settings --> Technical --> Emails` - -.. image:: faq/email-retry-technical.png - :align: center - :alt: Retry button of an emails +- Use an external outgoing email server to be independent of Odoo's mail limit (refer to the + corresponding :doc:`email documentation + `). +- Wait until 11 PM (UTC) for the daily limit to reset, and retry sending the email. In + :ref:`developer mode `, go to :menuselection:`Settings app --> Technical menu --> + Email --> Emails`, then click the :guilabel:`Retry` button next to an unsent email. .. warning:: - The daily limit is global to your database and can rise quickly! By default an internal message, - a notification, a note, etc. counts as an email in your daily limit if it notifies someone. + The daily email limit is comprehensive to the database. By default, any internal message, + notification, logged note, etc. counts as an email in the daily limit if it notifies someone via + email. This can be mitigated by receiving :ref:`notifications in Odoo + `, instead of emails. -You can mitigate this by receiving your :ref:`notifications in Odoo ` -instead of by emails. - -SMTP Error +SMTP error ********** -You can find out why an email wasn't transmitted successfully by reviewing the Simple Mail -Transport Protocol (SMTP) error messages. SMTP is a protocol to describe the email structure -and transmit it over the Internet, and the error messages generated by email services are helpful -tools to diagnose and troubleshoot email problems. +Simple Mail Transport Protocol (SMTP) error messages explain why an email wasn't transmitted +successfully. :abbr:`SMTP (Simple Mail Transport Protocol)` is a protocol to describe the email +structure, and transmits data from messages over the Internet. The error messages generated by email +services are helpful tools to diagnose and troubleshoot email problems. -No Error -******** +.. example:: + This is an example of a 554 SMTP permanent delivery error: `554: delivery error: Sorry, your + message to ------@yahoo.com cannot be delivered. This mailbox is disabled (554.30). - + mta4471.mail.bf1.yahoo.com --- Below this line is a copy of the message.` -Odoo is not always capable of providing information for the reason it failed. The different -providers implement a personalized policy of the bounce emails and it is not always possible -for Odoo to interpret it correctly. +The debug menu can be used to investigate SMTP sending issues from a database. To access the menu, +:ref:`developer mode ` must be activated. Once activated, navigate to the +:menuselection:`Debug Menu` in the top right of the menu bar (the :guilabel:`🐞 (bug)` icon), +:menuselection:`Debug Menu --> Manage Messages` -If you have this problem on a recurring basis with the same client or the same domain, please -do not hesitate to contact `Odoo Support `_ for help in finding a reason. +The :guilabel:`Manage Messages` menu opens a list of all the messages sent in a particular record. +Within each message there is information on sending, including the type, and subtype, of the +message. -Note: in such case, one of the most common reasons is related to :ref:`SPF ` -and/or :ref:`DKIM ` configuration. +Other information includes to whom the message was sent, and whether Odoo received a bounce-back +message from an email server. -Why is my email sent late? -************************** +.. image:: faq/manage-messages.png + :align: center + :alt: Manage messages menu option on the debug menu. -It may happen that you schedule an email campaign but it is not sent on time. We know that -we use a delayed job to send emails that we consider as not urgent (Newsletters concept -such as mass mailing, marketing automation, events). The system utility **cron** can be used -to schedule programs to run automatically at predetermined intervals. We use that policy in order -to avoid cluttering the mail servers and prioritize the communication. +.. note:: + A user must be on a view in Odoo that has a chatter in order for the :guilabel:`Manage Messages` + menu option to appear. -The emails considered urgent (communication from one person to another one such as -Sales Orders, Invoices, Purchase Orders, etc.) are sent directly. +No error populated +^^^^^^^^^^^^^^^^^^ + +Odoo is not always capable of providing information for the reason it failed. The different email +providers implement a personalized policy of bounced emails, and it is not always possible for Odoo +to interpret it correctly. + +If this is a recurring problem with the same client, or the same domain, do not hesitate to contact +`Odoo Support `_ for help in finding a reason. + +.. note:: + One of the most common reasons for an email failing to send with no error message is related to + :ref:`SPF ` and/or :ref:`DKIM + ` configuration. Also, check to make sure the + `mail.bounce.alias` is defined in the *system parameters*. Access system parameters in + :ref:`developer mode ` by navigating to :menuselection:`Settings app --> + Technical menu --> Parameters --> System Parameters`. + +Email is sent late +------------------ + +Email campaigns send at a scheduled time, using a delay pre-programed in the database. Odoo uses a +delayed task to send emails that are considered "not urgent" (newsletter formats, such as: mass +mailing, marketing automation, and events). The system utility **cron** can be used to schedule +programs to run automatically at predetermined intervals. Odoo uses that policy in order to avoid +cluttering the mail servers and, instead, prioritizes individual communication. This **cron** is +called :guilabel:`Mail: Email Queue Manager`, and can be accessed in :ref:`developer mode +` by going to :menuselection:`Settings app --> Technical menu --> Automation --> +Scheduled Actions`. .. image:: faq/email-scheduled-later.png :align: center :alt: Email scheduled to be sent later. -By default, the Mass Mailing cron runs every 60 minutes. So, you should wait maximum an hour -before the campaign is actually sent. +.. tip:: + What is a **cron**? A cron is an action that Odoo runs in the background to execute particular + code to complete a task. + +.. important:: + By default, the *Mass Mailing cron* runs every 60 minutes. This can be changed to no less than 5 + minutes. However, running the action every 5 minutes would bog down the Odoo database (stress the + system), so this is not recommended. To edit the mass mailing cron, select the scheduled action + :guilabel:`Mail: Email Queue Manager`, and proceed to make any necessary adjustments. + +Emails that are considered urgent (communication from one person to another, such as sales orders, +invoices, purchase orders, etc.) are sent immediately. Incoming emails =============== -When you have an issue with incoming emails, there might not be an indication per se in Odoo. -This is the client who tries to contact a database who will get a bounce (most of the -time 550: mailbox unavailable). +When there is an issue with incoming emails, there might not be an indication, per se, in Odoo. It +is the sending email client, who tries to contact a database, that will get a bounce-back message +(most of the time a :guilabel:`550: mailbox unavailable` error message). -Emails are not received ------------------------ - -Depending on the platform you are using: - -- The **Odoo.sh** users can find their live logs on the folder :file:`~/logs/`. - -- The folder :file:`~/logs/` (preferably accessed by the command line) of an Odoo.sh contains - a list of files containing the logs of the database. The log files are created everyday - at 5:00 AM UTC. The two last days are not compressed, while the older ones are, in order - to gain space. The naming of the files for Today and Yesterday are :file:`odoo.log` and - :file:`odoo.log.1`. For the following, they are named with their dates and compressed. - See the Odoo.sh documentation about :ref:`logs `. Use the command ``grep`` and - ``zgrep`` (for the compressed ones) to search through the files. - -- **Odoo Online** users won’t have access to their logs. However you can still contact - `Odoo Support `_ , if you have a recurring issue - with the same client or domain. - -Get help from support +Email is not received --------------------- +The steps that should be taken depend on the Odoo platform where the database is hosted. + +**Odoo.sh** users can find their live logs on the folder :file:`~/logs/`. + +Logs are a stored collection of all the tasks completed in a database. They are a text-only +representation, complete with timestamps of every action taken on the Odoo database. This can be +helpful to track emails leaving the database. Failure to send can also be seen by logs that indicate +that the message tried to send repeatedly. Logs will show every action to the email servers from the +database. + +The folder :file:`~/logs/` (accessed by the command line or on the Odoo.sh dashboard) of an Odoo.sh +database contains a list of files containing the logs of the database. The log files are created +everyday at 5:00 AM (UTC). + +.. tip:: + The two most recent days (today and yesterday) are not compressed, while the older ones are, in + order to save space. The naming of the files for today and yesterday are respectively: + :file:`odoo.log` and :file:`odoo.log.1`. + + For the following days, they are named with their dates, and then compressed. Use the command + :command:`grep` and :command:`zgrep` (for the compressed ones) to search through the files. + +.. seealso:: + For more information on logs and how to access them via the Odoo.sh dashboard, see :ref:`this + administration documentation `. + + For more information on accessing logs via the command line visit :ref:`this developer + documentation `. + +**Odoo Online** users won't have access to the logs. However `Odoo Support +`_ can be contacted if there is a recurring issue with the same client or +domain. + +Get help from Odoo support +========================== + In order to get helped efficiently, please provide as much information as possible. Here is a list -of what can be helpful: +of what can be helpful when reaching out to the Odoo Support team about an issue: -- The **EML** of the email, stating for *Electronic Mail*, is the file format containing all the - technical information required for an investigation. The documentation of your own email provider - might help you on how to get your EML files. Once you get the EML of the email, adding it - in the attachment of your ticket is the most efficient way for us to investigate. The support - will mainly focus on redundant issues. +#. Send a copy of the email headers. The `.EML` file (or **headers**) of the email is the file + format containing all the technical information required for an investigation. The documentation + from the email provider might explain how to access the EML file/header files. Once the headers + of the email are obtained, adding it into the Odoo Support ticket is the most efficient way for + the Odoo Support team to investigate. - .. seealso:: - - `Gmail documentation - `_ - - `Outlook documentation - `_ + .. seealso:: + - `Gmail documentation on headers `_ + - `Outlook documentation on headers + `_ -- The exact flow you are following in order to normally receive those emails in Odoo. Here are - examples of questions whose answers can be useful: +#. Explain the exact flow that is being followed to normally receive those emails in Odoo. Here are + examples of questions whose answers can be useful: - - Is this simply a reply from an email going out from Odoo ? + - Is this a notification message from a reply being received in Odoo? + - Is this a message being sent from the Odoo database? + - Is there an incoming email server being used, or is the email somehow being redirected? + - Is there an example of an email that has been correctly forwarded? - - Are you using an incoming email server or somehow redirecting? +#. Provide answers to the following questions: - - Can you provide us with an example of an email that has been correctly forwarded ? + - Is it a generic issue, or is it specific to a use case? If specific to a use case, which one + exactly? + - Is it working as expected? In case the email is sent using Odoo, the bounce email should reach + the Odoo database, and display the :ref:`red envelope `. -- Providing answers to the following questions: - - - Is it a generic issue or is it specific to a use case? If yes, which one exactly? - - - Is it working as expected? In case the email is sent using Odoo, the bounce email should reach - the Odoo database and display the :ref:`red envelope `. +.. note:: + The bounce system parameter needs to be set in the technical settings in order for the database + to correctly receive bounce messages. To access this setting, go to :menuselection:`Settings app + --> Technical menu --> Parameters --> System Parameters`. Then select the parameter name + :guilabel:`mail.bounce.alias` and set the value to `bounce` if it isn't already set. diff --git a/content/applications/general/email_communication/faq/manage-messages.png b/content/applications/general/email_communication/faq/manage-messages.png new file mode 100644 index 000000000..815301ce9 Binary files /dev/null and b/content/applications/general/email_communication/faq/manage-messages.png differ diff --git a/content/developer/tutorials/getting_started/04_basicmodel.rst b/content/developer/tutorials/getting_started/04_basicmodel.rst index 1c4e2d231..27200d49b 100644 --- a/content/developer/tutorials/getting_started/04_basicmodel.rst +++ b/content/developer/tutorials/getting_started/04_basicmodel.rst @@ -110,6 +110,8 @@ the **Goal**. Add a ``_description`` to your model to get rid of one of the warnings. +.. _developer/fields: + Model fields ============