Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My knowledge here is lacking and you didn't provide enough code to reproduce that email message, but I think your problem may be that you have all your parts/attachment attached to a single top level multipart/alternative part.</p> <p>In case you'd have $plain_body and one attachment (so $count = 1) your multipart/alternative message would consit of 4 parts arranged like this:</p> <pre><code>multipart/alternative: text/plain text/html mutlipart/related (it is empty, you did not attach anything to it!) text/plain (or other type, depends what attachment you had </code></pre> <p>You probably need something in terms of:</p> <pre><code>multipart/mixed: multipart/alternative: text/plain text/html text/plain (first attachment) </code></pre> <p>So that whole message is of multipart/mixed type and it contains: 1. multipart/alternative with two alternative messages (html and text presumably) 2. any number of "attachments"</p> <p>In your current version everything is under multipart/alternative, so mail reader considers all your attachments as different versions of the same content and may not provide "download to them"</p> <p>You can create nested parts structure by calling ->attach methods on parts being result of other attach, for example:</p> <pre><code>my $top = MIME::Entity-&gt;build( ... Type =&gt; "multipart/mixed", ); my $alternative = $top-&gt;attach( ... Type =&gt; "multipart/alternative", ); # Now we add subparts IN the multipart/alternative part instead of using main message $alternative-&gt;attach( ..., Type =&gt; "text/plain"); $alternative-&gt;attach( ..., Type =&gt; "text/html"); # Now we add attachments to whole message again: for (@attachments) { $top-&gt;attach( ... ); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload