below is a script that suppose to send an email with a single attachment (doc file) the script send the mail but split the attachment to multiple parts (14) )i guess its because the Type=>), any idea on how to resolve this issue ?
use strict; use warnings; use FindBin; use Net::SMTP::TLS; use MIME::Lite; use lib ("$FindBin::Bin/CPAN"); my $msg = MIME::Lite->new( From => 'mail', To => 'mail', Subject => 'Perl Test', Type =>'multipart/signed', ); $msg->attach( Type => 'application/msword', Path => 'some path', Filename => 'FORM50.doc', Disposition => 'attachment', ); my $mailer = new Net::SMTP::TLS( 'smtp.gmail.com', Port => 587, User => 'user', Password=> 'password'); $mailer->mail('mail'); $mailer->to('mail'); $mailer->data; $mailer->datasend($msg->as_string); $mailer->dataend; $mailer->quit;
In reply to MIME::lite and Net::SMTP::TLS - split attachment by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |