ccrational has asked for the wisdom of the Perl Monks concerning the following question:

Hi All

I ma using below perl script program to send email from windows xp

#!C:/Perl/bin/perl.exe use Mail::Sendmail; my $to_list = 'chmunive@xxxx.com'; my $cc_list = 'satishjagu@xxxx.com'; my $email = "\n\nThis email was generated automatically.\n"; my $MailFrom = "chmunive@xxxxx.com"; my $subject = "hello test"; my $message = "module test"; %mail = ( To => $to_list, From => $MailFrom, Bcc => $bcc_list, Cc => $cc_list, Subject => $subject, Message => $message ); $mail{Smtp} = 'smtp host name'; sendmail(%mail);
When run the program it through the error message as below,
C:\Documents and Settings\chalapathi\Desktop\Scripts>perl Email.pl Can't locate Mail/Sendmail.pm in @INC (@INC contains: C:/Perl/site/lib + C:/Perl/l ib .) at Email.pl line 2. BEGIN failed--compilation aborted at Email.pl line 2. C:\Documents and Settings\AAAAAAA\Desktop\Scripts>
Please kindly correct me where i am doing mistake.

Thanks in advance

Replies are listed 'Best First'.
Re: Sending email from PERL script in windows
by Corion (Patriarch) on Sep 25, 2009 at 08:34 UTC
Re: Sending email from PERL script in windows
by venkatesan_G02 (Sexton) on Sep 25, 2009 at 10:13 UTC
    You can also try Net::SMTP. For me, Mail::Sendmail never worked with Perl 5.6. So, i would recommend installing Perl 5.10