Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all I have written a sendmail script using Mail::Mailer (sendmail) module on Linux machine. I need to execute same script on windows platform. For that I tried to Install Mail::Mailer module using ppm on windows. But unfortunetly through ppm installation failed. So I directly copied Mail folder which contains all the .pm files including Mailer.pm, sendmail.pm, smtp.pm And tried the following codeAt execution it is giving an errorcode:
#!C:\Perl\bin -w use Mail::Mailer; $from_addr = "<from\@domain.com>"; $to_addr = "<to\@domain.com>"; $subject = "testing sendmail on windows"; $msg_body = "just testing"; # Create a new instance of sendmail program to deliver the mail $mailer = Mail::Mailer->new(); # Header of the message $mailer->open({ From => $from_addr, To => $to_addr, Subject => $subject, }) or die "Can't open: $!\n"; # Print the body of your message print $mailer $msg_body; # Close the Mail::Mailer object $mailer->close() or die "Can't close mailer: $!\n";quote:Can anybody now how to fix it? Thanks..
Died at C:/Perl/lib/Mail/Mailer.pm line 285.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.