Just another Perl shrine | |
PerlMonks |
Multi-Part email with Attachments using MIME::Liteby filmo (Scribe) |
on Aug 16, 2001 at 01:53 UTC ( [id://105200]=perlquestion: print w/replies, xml ) | Need Help?? |
filmo has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to using MIME::Lite to generate HTML e-mail with multiple attachments. I want to be able to send MS Word documents with a simple message in both plain text and HTML to various clients. The generation of the plain text and html portion work fine and are viewable by various e-mail clients. The problems is the attachements which don't seem to be attaching correctly. (see my suspicions below regarding nesting of "multipart/alternative" within "multipart/mixed"). Here's the code I've got so far. The problems seems to be that e-mail created isn't "nested correctly". The current code creates a message that is: (I've changed the boundary to "AAA" for illustrative purposes herein) Given that e-mail messages I've sent myself with attachements appear as below, I think the code needs to be restructured to create the nesting of the "multipart/alternative" within the "multipart/mixed" as illustrated below. (The distinction between the two is that the last example "nests" the plain/html email message within a "multipart/mixed" as opposed to the first which calls it a "multipart/alternative" and places the attachments within the same context as the plain/HTML e-mail message.)
So I guess the real question is how do I use MIME::Lite to create the working "nested" version.
Back to
Seekers of Perl Wisdom
|
|