Skip to content
Snippets Groups Projects
Commit 98ce81ca authored by David Beguin's avatar David Beguin
Browse files

[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
parent 6c68059a
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment