Chapter 12 ■ Building and parsing e-Mail
231
You can see all of these mechanisms in play together by examining the following output, which is from the most
complicated of the four command lines given above. It asks for both an inline-related image to accompany the HTML
with –i and also for attachments to be included after the body.
To: Test Recipient [email protected]
From: Test Sender [email protected]
Subject: Foundations of Python Network Programming
Date: Tue, 25 Mar 2014 17:14:01 -0400
Message-ID: 20140325232008.15748.50494@guinness
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0086939546=="
--===============0086939546==
Content-Type: multipart/alternative; boundary="===============0903170602=="
--===============0903170602==
Content-Type: multipart/related; boundary="===============1911784257=="
--===============1911784257==
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
Hello,
This is a test message from Chapter 12.
- Anonymous
This is the smallest possible blue GIF:
--===============1911784257==
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="blue-dot.gif"
Content-ID: 20140325232008.15748.99346@guinness
MIME-Version: 1.0
R0lGODlhAQABAJAAAAAA/wAAACwAAAAAAQABAAACAgQBADs=
--===============1911784257==--
--===============0903170602==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
Hello,
This is a MIME message from Chapter 12.
- Anonymous
--===============0903170602==--