Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5615 closed (fixed)

Typo in email docs: "to" field should be a list

Reported by: raprasad@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: email to
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


documentation typo on:

The "to" address is not a list:

-fix 1-


subject, from_email, to = 'hello', '', ''


subject, from_email, to = 'hello', '', ['']

--- OR ---

-fix 2-

msg = EmailMultiAlternatives(subject, text_content, from_email, to)


msg = EmailMultiAlternatives(subject, text_content, from_email, [to])

Attachments (1)

5615.diff (605 bytes) - added by Tom Vergote 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by Tom Vergote

Attachment: 5615.diff added

comment:1 Changed 11 years ago by Tom Vergote

Has patch: set

I prefer the second fix since it is consistent with the next example

msg = EmailMessage(subject, html_content, from_email, [to])
msg.content_subtype = "html" # Main content is now text/html

feel free to disagree

comment:2 Changed 11 years ago by Matt Boersma

Keywords: email to added
Summary: typo in e-mail documenation: "to" address is a string, not a listTypo in email docs: "to" field should be a list
Triage Stage: UnreviewedReady for checkin

The specific code that this ends up calling is the parent class EmailMessage.init, which does indeed expect a list as it does ','.join() on it soon afterward. I prefer the second fix as you have in your patch, too.

comment:3 Changed 11 years ago by raprasad@…


tvrg's patch looks good

comment:4 Changed 11 years ago by James Bennett

Resolution: fixed
Status: newclosed

(In [6431]) Fixed #5615: Corrected a typo in docs/email.txt. Thanks, raprasad@….

comment:5 Changed 11 years ago by anonymous


Note: See TracTickets for help on using tickets.
Back to Top