create Email with multiple HTML blocks embedded

Thomas 'PointedEars' Lahn PointedEars at web.de
Sun Jan 31 16:34:48 EST 2016


kevind0718 at gmail.com wrote:

> Following your suggestions, I now have code that looks like the below.
> I get the same result.   First HTML is displayed in body of email and
> second shows up as an attachment.

Works as designed.  The message structure is correct now, but there is no 
plain-text part.  So a MUA that is capable and configured to display HTML
e-mails has no choice but to assume that you wanted the first part to be 
displayed directly as it is not marked as an attachment.  Consequently, it 
*must* consider and display the second HTML part as an attachment.

It might help if you inserted a plain-text part before the HTML part, and 
you should have such (so that people who are not keen to see HTML messages 
see anything in that message), but you should also mark the parts as 
*attachments* that you want to be considered that by the MUA.

See RFC 5233 and RTFM for details.
 
> A dump of the email message is also below.
> 
> Maybe this would help.

It does (although you could have trimmed the parts in the middle), but next 
time you want to post a follow-up to *my* message (or that of whoever posted 
a follow-up to yours), not to your own.  This newsgroup/mailing list is a 
discussion medium that uses *threads*.  As you have not observed that, I 
have seen your posting only now as I checked the newsgroup manually, while 
otherwise I would have been notified of it when I started my newsreader and 
automatically checked all newsgroups for new postings.

Since you are using Google Groups, see
<http://twovoyagers.com/improve-usenet.org/> pp. for the details.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.



More information about the Python-list mailing list