Skip to content

Conversation

@samueljlieber
Copy link
Contributor

Manual cherry pick of #2626 which is a follow up from #1449.

Odoo 15.0 introduced the ability to use a specific email server depending on the "From". So a new section "Set up different outgoing servers in a multi-company environment" has been added in the documentation. This explains the logic applied to select the right email server.

@robodoo
Copy link
Collaborator

robodoo commented Aug 24, 2022

@StraubCreative
Copy link
Contributor

StraubCreative commented Aug 24, 2022

@cth-odoo @tiku-odoo @std-odoo @AntoineVDV
Let's continue content and technical review here for this PR.

@samueljlieber took all of the change requests from the prior PR (#1449) and moved them over to this new feature branch. Now we have a clean commit history and no more technical hiccups.

Please take a look at what we have here, and let Sam know if any changes are needed in the content and he will take care of making those updates. Afterwards we can ship to final reviews.

Thank you 🙏

@tiku-odoo
Copy link
Contributor

@Abridbus @std-odoo When you have a moment can you review this change? We will be documenting the from_filter in as well: #2055

We are open to suggestions. Thanks, Tim

@StraubCreative Although this PR is for V15 only, this document is being updated in PR #2075 (V13-V15)

@tiku-odoo tiku-odoo requested a review from std-odoo September 6, 2022 19:56
@samueljlieber samueljlieber added OE Linked to a support ticket and removed OE Linked to a support ticket labels Sep 7, 2022
Copy link
Contributor

@tiku-odoo tiku-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samueljlieber Here is a draft of the changes to be made per @std-odoo

Thanks

@samueljlieber samueljlieber force-pushed the 15.0-email-server-from-cth branch from b855871 to 9930359 Compare September 7, 2022 14:19
@samueljlieber
Copy link
Contributor Author

Hi @tiku-odoo and @std-odoo!

Thanks for the suggestions! I made the content change and I updated the commit message tag to use all uppercase.

Copy link
Contributor

@tiku-odoo tiku-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samueljlieber Looks great! Tagging @mivu-odoo for final review.

@tiku-odoo tiku-odoo requested a review from mivu-odoo September 7, 2022 15:21
Copy link
Contributor

@mivu-odoo mivu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @samueljlieber and @tiku-odoo! Thanks for your patience on this!

As I was going through this file, I noticed things were sounding very familiar. Is it the same content as PR #2075? If it is the same content, with no changes, it might be easier to finish PR #2075 first and get that approved, merged, and forward-ported. Then, we can simply copy the content onto this PR.

If there are slight changes, please let me know and I can finish my review, while trying to keep the content of the email_servers.rst file from this PR as close to the email_servers.rst file from PR #2075.

@StraubCreative
Copy link
Contributor

StraubCreative commented Sep 16, 2022

Then, we can simply copy the content onto this PR.

while trying to keep the content of the email_servers.rst file from this PR as close to the email_servers.rst file from PR #2075.

If both PRs are editing the same content in the same file, then we will likely run into a merge conflict during rebase.

Normally, the merge conflict is solved by picking the the changes from w/e commit has the correct content, as in, there shouldn't be a need to manually make sure the versions match.

However, given that there are considerable differences between the two versions, either @samueljlieber or I would need guidance as to where the last PR ends and where the new one begins. It sounds like @mivu-odoo is asking for the same thing as to avoid reviewing content that would become obsolete with the forward-port from #2075 .

I agree to let #2075 get merged first-- afterwards, let's see if a merge conflict shows up. If it does, then let's jump on a a screenshare @samueljlieber @tiku-odoo and go through the merge conflict together so we can set this up right for @mivu-odoo 's review.

@StraubCreative
Copy link
Contributor

Update:

We're just waiting for the forward-port PRs to finish up on #2075. Had to solve a merge conflict on one of them which affected a few others, but they should be on track again.

After those are done we can rebase those changes into this PR and @tiku-odoo / @std-odoo we'll need your help picking what changes we should keep for the final version of the file.

cc: @mivu-odoo @samueljlieber

@tiku-odoo
Copy link
Contributor

@StraubCreative / @samueljlieber --

It looks like all the forward ports for PR #2075 have been closed out.

The material in this PR should be placed before the section on 'Set up different dedicated servers for transactional and mass mails'.

For this change we will be adding Lines 217 --> 247 in the files changes doc on this PR:


Setting up different outgoing email servers for a multi-company environment

The "From Filter" allows for the use of a specific outgoing email server depending on the "From"
email address that Odoo is sending on behalf of. When an email is sent from Odoo and the "From
Filter" is configured, then the email server will be chosen as follows:

#. Odoo searches for an email server having the same "From Filter" as the "From" email address
defined in the outgoing email. For example, if the "From" email address is test@example.com,
only the email servers having the "From Filter" equal to test@example.com will be returned.

#. If no email servers are found, then Odoo searches for an email server having the same domain in
the "From Filter" as in the "From" email address of the outgoing email. For example, if the
"From" email address is test@example.com, only the email servers having the "From Filter" equal
to example.com will be returned.

If no email servers are found after checking for the domain, then Odoo will return all email
servers without any "From Filter" set.

Should this previous query return no results, then Odoo performs a search for an email server
using the system parameter: 'mail.default.from'. First, the email address listed will attempt
to match an email server and then the domain will attempt a match.

If no email server is found then Odoo will return the first outgoing email server (sorted by
priority). In this case, it is likely the email configuration will be spoofing the email and it
will be flagged as Spam.

.. note::
If several email servers are found, then Odoo will use the first one according to its priority.
For example, if there are two email servers, one with a priority of 10 and the other with a
priority of 20, then the email server with a priority of 10 will be used.

@samueljlieber samueljlieber force-pushed the 15.0-email-server-from-cth branch from 9930359 to e8a7283 Compare November 1, 2022 20:31
@C3POdoo C3POdoo requested a review from a team November 1, 2022 20:52
@samueljlieber samueljlieber force-pushed the 15.0-email-server-from-cth branch from 9a26c86 to af46e00 Compare November 1, 2022 20:52
@samueljlieber
Copy link
Contributor Author

Commit af46e00 to correct changes email_servers.rst.

In this PR #2627, changes were initially made to .../discuss/advanced/email_servers.rst when they should have been made to .../general/email_communication/email_servers.rst.

Copy link
Contributor

@mivu-odoo mivu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @samueljlieber and @tiku-odoo!

I made a couple of comments on formatting and small word changes. Once you integrate those, please tag me again and I'll approve this PR so it can move onto ZST for final technical review. Thank you 😸

@tiku-odoo tiku-odoo force-pushed the 15.0-email-server-from-cth branch from af46e00 to d2b951f Compare November 3, 2022 15:35
@tiku-odoo
Copy link
Contributor

@mivu-odoo This document has been updated with your changes. Can you review the doc once more? Thanks in advance for your help on this doc :)

Copy link
Contributor

@mivu-odoo mivu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @samueljlieber and @tiku-odoo!

Thank you for making the edits! I found one more quick edit on Line 211 (changing the single quotation marks to backticks). Once you push that through, feel free to go straight to ZST for final technical review, no need to tag me again.

Thank you 😸

Copy link
Contributor

@StraubCreative StraubCreative left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tiku-odoo 👋

I have a few suggestions below, which mainly involve GUI elements, context, and word choices. They are as follows:

  • add :guilabel:'s to GUI elements, since we are directly referring to them AND entertaining interactions with them.
  • add navigational steps to provide location-based context to the user; the documentation is not helpful if the user doesn't know where they're supposed to be 😉
  • some word choices here and there to improve flow/clarity.
  • one instance of an early line break

For future PRs, here are a few improvements I'd recommend to bring up the quality of the whole doc 🚀

cc: @mivu-odoo @samueljlieber

@tiku-odoo tiku-odoo force-pushed the 15.0-email-server-from-cth branch 2 times, most recently from 0422c98 to 65aef56 Compare November 9, 2022 16:30
@tiku-odoo
Copy link
Contributor

@mivu-odoo When you have a moment can you review this doc again? Thanks in advance for your review. 👍

Copy link
Contributor

@mivu-odoo mivu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tiku-odoo!

I made some comments/suggestions, mainly targeted towards clarity. I also think some parts can benefit from a sample use case to help the reader understand why they might need to use the feature.

When you're ready, tag me again for another look 😸 Thank you!

=======================================================================

The :guilabel:`FROM Filtering` field allows for the use of a specific outgoing email server
depending on the :guilabel:`From` email address that Odoo is sending on behalf of. Access this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the first sentence (The...on behalf of), I would add a real-life example (1-3 sentences) of why a company might want to use this feature. The section header says it's for multi-company environments. Try to simplify for the reader and help them visualize how they would apply this section's knowledge to their business.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mivu-odoo I've added two separate sentences: 1. to improve deliverability 2. In a multi-company environment

The title seemed a bit too specific and I've made it more general as multi-company sending is not the only application. I've changed it to: Utilizing the FROM Filter on an outgoing email server

If no email servers are found after checking for the domain, then Odoo will return all email
servers that do not have any :guilabel:`FROM Filtering` value(s) set.

Should this previous query return no results, then Odoo performs a search for an email server using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify this previous query - which one are we talking about?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence refers to the sentence in the previous line. I've removed the word previously.

@tiku-odoo tiku-odoo force-pushed the 15.0-email-server-from-cth branch from 65aef56 to 975643a Compare November 10, 2022 18:06
@tiku-odoo
Copy link
Contributor

@mivu-odoo This PR is ready for another review from you when you have a chance. Thanks in advance for your help on this From Filter PR.

Copy link
Contributor

@mivu-odoo mivu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tiku-odoo!

Thank you for addressing my comments! The first paragraph of the Utilizing the From Filter on on outgoing email server section is easier to understand now.

Please move forward to final technical review and tag ZST. Thank you 😸

@tiku-odoo
Copy link
Contributor

Thanks @mivu-odoo

@StraubCreative This doc is ready for your technical review whenever you have a moment. Thanks in advance for your help on this PR. 👍

@StraubCreative StraubCreative force-pushed the 15.0-email-server-from-cth branch from 975643a to ed0ed06 Compare November 18, 2022 22:26
Copy link
Contributor

@StraubCreative StraubCreative left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited a line break + fresh rebase in ed0ed06 but otherwise LGTM 👍

Note/reminder to create a card to do entire doc update since a lot of the RST formatting seems out of date @tiku-odoo @samueljlieber . Content could always use another look too just in case ;)

Tagging in @odoo/doc-review

@StraubCreative StraubCreative requested a review from a team November 18, 2022 22:30
Copy link
Collaborator

@AntoineVDV AntoineVDV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo pushed a commit that referenced this pull request Nov 21, 2022
closes #2627

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
@robodoo robodoo temporarily deployed to merge November 21, 2022 09:44 Inactive
@robodoo robodoo closed this Nov 21, 2022
@fw-bot
Copy link
Collaborator

fw-bot commented Nov 25, 2022

5 similar comments
@fw-bot
Copy link
Collaborator

fw-bot commented Nov 26, 2022

@fw-bot
Copy link
Collaborator

fw-bot commented Nov 27, 2022

@fw-bot
Copy link
Collaborator

fw-bot commented Nov 28, 2022

@fw-bot
Copy link
Collaborator

fw-bot commented Nov 29, 2022

@fw-bot
Copy link
Collaborator

fw-bot commented Nov 30, 2022

@samueljlieber samueljlieber changed the title [add] discuss: specific email server from [ADD] discuss: specific email server from Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants