Perhaps I missread your reply, but it seems like the two examples simply create a single 'multipart/mixed' MIME. The first one sends some plain text and then attaches an HTML file. The second on sends some plain text and then attaches a word file (even though Type=> is set to octet-stream and not 'msword'.

What I'm looking to do is created a formatted e-mail body complete with all html code with a fall back to a simple plain text message if the receipient doesn't have a current email browser that can view HTML e-mails. In addition to those two parts, I also want to attach multiple attachements.

It seems that the correct way to do this is to set the header to 'multipart/mixed' and then define one of the multiparts as 'multipart/alternative' instead of 'text/plain' or 'text/html'. Within that sub-part, the 'text/plain' and 'text/html' are then created. Once the sub-part is "closed-out", then the attachments are added to the original 'multipart/mixed'
--
Filmo the Klown


In reply to Re: Re: Multi-Part email with Attachments using MIME::Lite by filmo
in thread Multi-Part email with Attachments using MIME::Lite by filmo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.