For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > November 2006 > Perl on Linux => Perl on Windows facing Problem!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Perl on Linux => Perl on Windows facing Problem!
zing_foru

2006-11-22, 5:37 am

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 code

code:
#!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";


At execution it is giving an error
quote:

Died at C:/Perl/lib/Mail/Mailer.pm line 285.



Can anybody now how to fix it?

Thanks..
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com