Opened 18 years ago
Closed 18 years ago
#3307 closed enhancement (fixed)
Implement BCC in the mail framework
Reported by: | James Bennett | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Mail) | Version: | |
Severity: | normal | Keywords: | mail, bcc |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Django's built-in send_mass_mail
is nice, but it's lacking two features which would make it even nicer (especially for folks who manage newsletters or other types of mailing lists):
- It can't handle multipart messages, which rules out sending HTML and plain-text versions of the same message.
- It doesn't do anything to hide the email addresses of the recipients, which is a no-no for newsletters.
So here's a proposal:
- Have
send_mass_mail
look at themessage
part of each datatuple; if the message is a list or tuple, send multipart with the first element being the plain-text and the second being the HTML. - Add a new optional keyword argument --
suppress_recipients
-- which defaults toFalse
(for backwards compatibility) but, ifTrue
, uses only the 'first' address inrecipient_list
in theTo:
field (so the first supplied address can be a mailing-list address or other screen) and the rest will go into theBcc:
field.
Attachments (2)
Change History (11)
by , 18 years ago
comment:1 by , 18 years ago
Summary: | Add some extra functionality to django.core.mail.send_mass_mail → [patch] Add some extra functionality to django.core.mail.send_mass_mail |
---|
comment:3 by , 18 years ago
Hmm. I thought I'd searched on this previously and not found anything, but I guess I was wrong. #1541 has a safer implementation of the multipart stuff.
comment:4 by , 18 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Ubernostrum (or someone), could you make a new patch to just provide the suppress_recipients
enhancement? Perhaps as a new ticket and then this can be closed as a dupe of that and #1541.
by , 18 years ago
Attachment: | only_suppress_recipients.diff added |
---|
Patch with only suppress_recipients
comment:5 by , 18 years ago
To me it would seem more natural and flexible to have a recipient_list
and optional bcc_list
in the datatuple.
comment:7 by , 18 years ago
Component: | Core framework → django.core.mail |
---|---|
Keywords: | mail bcc added |
Summary: | [patch] Add some extra functionality to django.core.mail.send_mass_mail → Implement BCC in the mail framework |
I'm changing this ticket to focus on the suppress recipients issue. Please continue discussion of the multipart message implementation at #1541.
I also agree with Gary here regarding the recipient_list/bcc_list issue, IMO that's more logical.
comment:8 by , 18 years ago
Triage Stage: | Accepted → Design decision needed |
---|
comment:9 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch which implements this proposal