problem w/ MIME::Lite and multipart/alternative emailsby geektron (Curate)
|on Jan 23, 2006 at 18:28 UTC||Need Help??|
geektron has asked for the wisdom of the Perl Monks concerning the following question:
i'm trying to send 'mixed' email: a message where the MUA decides which type to display (HTML or plaintext)
I've read through the perldoc for MIME::Lite and used the following to contruct the email:
the problem with the code: the HTML portion isn't coming through. using 'multipart/mixed' does send both portions, renders the HTML mail, but (as expected) attaches the text portion of the email -- which isn't the behavior i want.
i'm sure i'm missing something, but i'm not sure which direction i need to go.
EDIT: the problem is isolated to Thunderbird. Outlook handles the message appropriately, but Thunderbird ignores the HTML content.
EDIT 2: the problem is Thunderbird. it displays the last recognized MIME type, so if the message is built as above, the text-only portion is displayed. reversing the order builds a message so that Thunderbird does, in fact, display the HTML when 'Show Original HTML' is selected as the preference. (per this mozillazine.org forum post)