in reply to sending mail with attachment using send mail
You can use this code.
use strict; use warnings; use lib '/home/technical/Perl/module/share/perl/5.8.8'; use MIME::Lite; my($msg,$filename); $filename="./mimelite.pl"; $msg =MIME::Lite->new( #From =>'bks@gmail.com', To => 'dhadha@gmail.com', #To => 'leslie.bks@gmail.com', Subject => 'Testing with mime::lite module this is used to send ma +ils to others', Data => 'I have sent this mail using my perl script. Please check +the attachment which has that script.' ); $msg->attach( Type =>'TEXT', Path => $filename, Disposition => 'attachment' ); $msg->send();
|
|---|