Using MIME::Lite::TT::HTML I can send an email message with both a TEXT and HTML body, and the email client will display either the TEXT or the HTML version depending on the user preferences. This is how it is supposed to work.
However, when I add pdf attachments, while the attachments are sent just fine, BOTH the text and the HTML messages show up as visible. This is almost correct but not quite. As above, only one version should be displayed not both.
Hopefully someone can help me out. Here's an example of the code.
my $msg = MIME::Lite::TT::HTML->new( From => $mail_header->{From}, To => $mail_header->{To}, Cc => $mail_header->{Cc}, Subject => $mail_header->{Subject}, Template => { html => $self->{html_tt2}, text => $self->{txt_tt2}, }, TmplOptions => { INCLUDE_PATH => INCLUDE_PATH_EMAIL_TT2, }, TmplParams => $vars, ); $msg->attr("content-type" => "multipart/mixed"); for each attachment: $msg->attach( Type => $attachment->{Type}, Path => $filepath, Filename => $attachment->{Filename}, Disposition => 'attachment', ); end $msg->send;
In reply to MIME::Lite::TT::HTML attachments by kgish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |