-
- Downloads
[IMP] mail - mail.blacklist: Not send mass_mail to recipient that does't want to
Purpose ======= Improve mailing subscription to be more compliant with the European GDPR law. Keep a list of people who does not want to receive promotional emails (or mass mailing in general) anymore. Specifications =========== This commit is regrouping some main changes on mass mailing. - Added blacklist : Avoid sending mass mailing to blacklisted recipient (blacklisted = email address that doens't want to receive mass mailing anymore) Detailed implementation =================== Mail : - Add Blacklist mechanism in mail module (NOT in mass-mailing) : as we can send mass-mail without the mass-mailing module - Unicity in email -> To avoid error in import, override the create and return the existing record if any, else, create the record normally. - Blacklisting is done by email address and is cross model. Will apply to model that inherit the blacklist.mixin. - field 'is_blacklisted' -> computed : check if email is in blacklist + search method to be able to filter on is_blacklisted - When a email address is blacklisted, it will never get mass mailings anymore. Even if the email address is added to another mailing lists - Avoid sending notification to blacklisted recipients when sending email in mass mail mode. If the recipient is blacklisted, we should not even send a notification in the recipient's chatter for an email that he won't even receive. - When a email address is blacklisted, it can still get 'normal' mailings. - The blacklist shoud be accessible in Mass Mailing / Configuration / Blacklist and Settings / Technical / Email / Blacklist -> Renaming Settings / Technical / White / Black List config menu item into Channel Moderation to avoid confusion with Mass Mail Blacklist - Add indexes to the blacklist table (on email) to make it fast for access for the different use cases - _primary_email : attribute that must be overriden to specify which field must be used as email in the blacklist mechanism. - Filtering the blacklisted recipient in mail composer : done in mail._get mail value() In case of real mass mailing, we need the statistics to be computed in order to know how many recipients were ignored in the mail. So we cannot avoid sending mail but instead flag the mail as canceled. Task ID 33224
Showing
- addons/mail/__manifest__.py 1 addition, 0 deletionsaddons/mail/__manifest__.py
- addons/mail/models/__init__.py 1 addition, 0 deletionsaddons/mail/models/__init__.py
- addons/mail/models/mail_blacklist.py 97 additions, 0 deletionsaddons/mail/models/mail_blacklist.py
- addons/mail/security/ir.model.access.csv 1 addition, 0 deletionsaddons/mail/security/ir.model.access.csv
- addons/mail/views/mail_blacklist_views.xml 71 additions, 0 deletionsaddons/mail/views/mail_blacklist_views.xml
- addons/mail/views/mail_moderation_views.xml 1 addition, 1 deletionaddons/mail/views/mail_moderation_views.xml
- addons/mail/wizard/mail_compose_message.py 16 additions, 0 deletionsaddons/mail/wizard/mail_compose_message.py
- addons/mass_mailing/__manifest__.py 1 addition, 0 deletionsaddons/mass_mailing/__manifest__.py
- addons/mass_mailing/models/mass_mailing.py 7 additions, 9 deletionsaddons/mass_mailing/models/mass_mailing.py
- addons/mass_mailing/security/ir.model.access.csv 1 addition, 0 deletionsaddons/mass_mailing/security/ir.model.access.csv
- addons/mass_mailing/views/mass_mailing_blacklist_views.xml 4 additions, 0 deletionsaddons/mass_mailing/views/mass_mailing_blacklist_views.xml
- addons/mass_mailing/wizard/mail_compose_message.py 2 additions, 2 deletionsaddons/mass_mailing/wizard/mail_compose_message.py
Loading
Please register or sign in to comment