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;