I need to send a email based on the flag value, am using Email::Send module(CPAN).
Requirement :
1.Based on the $email_flag, call the send_email function so, script goes like this:
Expand|Select|Wrap|Line Numbers
- ## In main function ##
- if($email_flag == 1){
- &send_email; ## calling the send_email sub-function
- }
- else{
- print "There is some problem for process execution\n please check the script\n";
- }
- ### sub - function ####
- sub send_email {
- my $msg = q(From: abc.xyz@xyz.com
- To:xyz.abc@xyz.co.uk
- Subject:Time to Analyse - Report !!!
- );
- Email::Send->new({mailer => 'Sendmail'})->send($msg);
- }
not getting the mail.
don't know where is the mistake nor the script give any clue while running...
Am using Acitvestate perl v5.10.0 & OS is win2k.
Is there any other method where i can send simple mail ???
Regards,
Vijayarl