summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-07-10 13:59:01 -0400
committerR David Murray <rdmurray@bitdance.com>2016-07-10 13:59:01 -0400
commitfd087c71212c95ebe3430b987df30b5c06acde09 (patch)
treef2c7373d0982f8ff2e56398435d78598ab10f97d
parent3057c7fdaf4ee95e804999f92d1b2ffda8aefebf (diff)
downloadcpython-fd087c71212c95ebe3430b987df30b5c06acde09.tar.gz
#26176: fix usage of Address constructor in email examples.
Patch by Nathan Harold.
-rw-r--r--Doc/includes/email-alternative-new-api.py6
-rw-r--r--Doc/library/email-examples.rst2
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/includes/email-alternative-new-api.py b/Doc/includes/email-alternative-new-api.py
index c1255a68df..321f727c31 100644
--- a/Doc/includes/email-alternative-new-api.py
+++ b/Doc/includes/email-alternative-new-api.py
@@ -9,9 +9,9 @@ from email.utils import make_msgid
# Create the base text message.
msg = EmailMessage()
msg['Subject'] = "Ayons asperges pour le déjeuner"
-msg['From'] = Address("Pepé Le Pew", "pepe@example.com")
-msg['To'] = (Address("Penelope Pussycat", "penelope@example.com"),
- Address("Fabrette Pussycat", "fabrette@example.com"))
+msg['From'] = Address("Pepé Le Pew", "pepe", "example.com")
+msg['To'] = (Address("Penelope Pussycat", "penelope", "example.com"),
+ Address("Fabrette Pussycat", "fabrette", "example.com"))
msg.set_content("""\
Salut!
diff --git a/Doc/library/email-examples.rst b/Doc/library/email-examples.rst
index cbbcb78e24..ca085868b1 100644
--- a/Doc/library/email-examples.rst
+++ b/Doc/library/email-examples.rst
@@ -61,7 +61,7 @@ way we could process it:
Up to the prompt, the output from the above is::
- To: Penelope Pussycat <"penelope@example.com">, Fabrette Pussycat <"fabrette@example.com">
+ To: Penelope Pussycat <penelope@example.com>, Fabrette Pussycat <fabrette@example.com>
From: Pepé Le Pew <pepe@example.com>
Subject: Ayons asperges pour le déjeuner