Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] mail_single_send_several_recipients module #128

Open
wants to merge 3 commits into
base: 10.0
Choose a base branch
from

Conversation

chafique-delli
Copy link
Member

With this module, when there are several recipients,
Odoo send only one e-mail with all the addressees and no, one email per address.

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

With this module, when there are several recipients,
Odoo send only one e-mail with all the addressees and no, one email per address.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Odoo send only one e-mail with all the addressees and no, one email per address.
Odoo sends only one single e-mail with all the addressees and instead of one email per address.

email_to = []
for partner in self.recipient_ids:
email_to.append(formataddr((partner.name, partner.email)))
self.recipient_ids = [(6, 0, [])]
Copy link
Member

Choose a reason for hiding this comment

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

no super ?

Why not the following :

partner=None
self.recipient_ids = [(6,0, [])]
super().send_get_mail_to()

Copy link
Member Author

Choose a reason for hiding this comment

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

@hparfr ,
Because the super() method without partner uses the 'tools.email_split_and_format' method which uses the 'email.utils.getaddresses' method which does not list email addresses correctly.

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.

2 participants