Anybody know what's going wrong here?
Did you try to view the mail with another mail client? e.g pine, mutt, thunderbird? Looks like you don't have a "Content-Transfer-Encoding" mail header line (you have that in the parts only). Are you sure you want "quoted-printable" for your HTML part? you don't encode_qp() that.
Q: Could you tell me the way to Tipperary?
A: Well, I wouldn't start from here...
I would use MIME::Lite - it does all the encoding, boundary stuff and such for you.
sub sendmessage { my ($html,$text,$recipient,$reportdate) = @_; my $msg = MIME::Lite->new( From => 'foo@bar.org', To => $recipient, Subject => "A message from me", Type => 'multipart/alternative', Encoding => '8bit', ); $msg->attach( Data => $text, Type => 'text/plain', Encoding => 'quoted-printable', Disposition => 'inline', ); $msg->attach( Data => $html, Type => 'text/html', Encoding => 'quoted-printable', Disposition => 'inline', ); $msg->send(); }
And you don't need here-documents... ;-)
BTW, don't forget to either use or remove $reportdate.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Mail::Sendmail Multipart MIME isn't working
by shmem
in thread Mail::Sendmail Multipart MIME isn't working
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |