Note that the body is specified thru a variable, and the attachment is a file. I'm pretty sure you don't have to specify a filename when you create the attachment.my $subject = "FLR invoices"; my $msg = MIME::Entity->build( From => SOURCE, To => TARGET, Subject => $subject, Type => "multipart/mixed", ); my $textpart = <<END; Attached is the XML file $xmlfile. Andy END # Add the text greeting $msg->attach( Type => 'text/plain', Encoding => '7bit', Data => $textpart, ); # Add the XML file $msg->attach( Type => 'text/xml', Encoding => 'base64', Description => "XML file $xmlfile", Path => $xmlfile, ); $msg->send( 'sendmail' );
xoxo,
Andy
--
<megaphone>
Throw down the gun and tiara and come out of the float!
</megaphone>
In reply to Re: Mail with attachments, but w/o writing out a file first
by petdance
in thread Mail with attachments, but w/o writing out a file first
by mr.dunstan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |