Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: Doc/library/smtplib.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Doc/library/signal.rst ('k') | Doc/library/socketserver.rst » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/smtplib.rst Tue Jul 26 09:37:46 2011 +0300
+++ b/Doc/library/smtplib.rst Mon Jul 25 09:47:18 2011 -0400
@@ -348,32 +348,21 @@
.. versionchanged:: 3.2 *msg* may be a byte string.
-.. method:: SMTP.send_message(msg, from_addr=None, to_addrs=None, \
- mail_options=[], rcpt_options=[])
+.. method:: SMTP.send_message(msg, from_addr=None, to_addrs=None, mail_options=[], rcpt_options=[])
This is a convenience method for calling :meth:`sendmail` with the message
represented by an :class:`email.message.Message` object. The arguments have
the same meaning as for :meth:`sendmail`, except that *msg* is a ``Message``
object.
- If *from_addr* is ``None`` or *to_addrs* is ``None``, ``send_message`` fills
- those arguments with addresses extracted from the headers of *msg* as
- specified in :rfc:`2822`\: *from_addr* is set to the :mailheader:`Sender`
- field if it is present, and otherwise to the :mailheader:`From` field.
- *to_adresses* combines the values (if any) of the :mailheader:`To`,
- :mailheader:`Cc`, and :mailheader:`Bcc` fields from *msg*. If exactly one
- set of :mailheader:`Resent-*` headers appear in the message, the regular
- headers are ignored and the :mailheader:`Resent-*` headers are used instead.
- If the message contains more than one set of :mailheader:`Resent-*` headers,
- a :exc:`ValueError` is raised, since there is no way to unambiguously detect
- the most recent set of :mailheader:`Resent-` headers.
-
- ``send_message`` serializes *msg* using
+ If *from_addr* is ``None``, ``send_message`` sets its value to the value of
+ the :mailheader:`From` header from *msg*. If *to_addrs* is ``None``,
+ ``send_message`` combines the values (if any) of the :mailheader:`To`,
+ :mailheader:`CC`, and :mailheader:`Bcc` fields from *msg*. Regardless of
+ the values of *from_addr* and *to_addrs*, ``send_message`` deletes any Bcc
+ field from *msg*. It then serializes *msg* using
:class:`~email.generator.BytesGenerator` with ``\r\n`` as the *linesep*, and
- calls :meth:`sendmail` to transmit the resulting message. Regardless of the
- values of *from_addr* and *to_addrs*, ``send_message`` does not transmit any
- :mailheader:`Bcc` or :mailheader:`Resent-Bcc` headers that may appear
- in *msg*.
+ calls :meth:`sendmail` to transmit the resulting message.
.. versionadded:: 3.2
« no previous file with comments | « Doc/library/signal.rst ('k') | Doc/library/socketserver.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+