1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
>>> email = EmailMessage('Hello', 'Body', 'from@example.com',
... ['to@example.com'], reply_to=['another@example.com'],
... headers={'Message-ID': 'foo'}, cc=['foo@bar.quux'])
>>> email.recipients()
['to@example.com', 'foo@bar.quux']
>>> print(email.message().as_string())
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Subject: Hello
From: from@example.com
To: to@example.com
Cc: foo@bar.quux
Reply-To: another@example.com
Date: Thu, 28 Jan 2016 12:34:51 -0000
Message-ID: foo
Body
>>> |