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

EMAIL_CC update helpers.py #315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

detvan
Copy link

@detvan detvan commented Jul 31, 2024

EMAIL_CC in fir_notifications doesnt work for me. When i added these lines it does. Since iam not Python Dev please review this code. Thank you

EMAIL_CC in fir_notifications doesnt work for me. When i added these lines it does.  Since iam not Python Dev please review this code. Thank you
formatting
Copy link
Collaborator

@Augustin-FL Augustin-FL left a comment

Choose a reason for hiding this comment

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

This is by design: EMAIL_CC and EMAIL_BCC are added when emails are sent due to a click on "Alert" or "Takedown" on the web interface (fir_alerting or fir_abuse modules)

image

They are however not included when sending notification emails.

Shall this behavior be changed, it would be better to edit the file fir_notifications/methods/email.py like this:

             params = self.prepare(template, instance)
             email_message = prepare_email_message([user.email, ], params['subject'], params['description'],
-                                                  request=request)
+                                                  request=request, cc=getattr(settings, 'EMAIL_CC'),
+                                                  bcc=getattr(settings, 'EMAIL_BCC'))
             messages.append(email_message)
         if len(messages):
             connection = mail.get_connection()

added EMAIL_CC and EMAIL_BCC options to fir_notifications plugin
rool back EMAIL_CC because Alert, Takedown feature is impacted too.
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