Hmm. Checked with dumper. The (fixed) opener code indeed switches to a 3 part multipart/alternative type, which can be successfully mailed, and mutt by default displays the text part of the 2 'inline' parts, and shows all parts with v.

Given the implied structure by the code you're right that a hierarchic MIME structure is probably intended by Analog (attaching $alternatives as a (implicit disposition inline?) MIME part to an outer MIME $message as per your skeleton, zwon).

And it is indeed preferrable to merely relying on the inline disposition of the working (sensu code sending email instead of aborting) flattened structure produced Analog's initial code scrap. Assuming that modern-day apps should be capable of parsing more than the most trivial of MIMEs (insert some sarcasm of your choice about mailer software quality).

Darn it, I really depend on the missing one or two lines of comments, when comparing 2 more or less working code scraps :/. Eyeing the detail makes me register the more elegant code, but it also makes me consider elegance/simplicity to be just a currently irrelevant attribute for the task at hand.

sigh, g'night,
Peter


In reply to Re^5: MIME::Lite and Multipart by jakobi
in thread MIME::Lite and Multipart by Analog

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.