H
hillgoogle
I have an issue in my perl and its due to my mis-underatanding of perl
sub.
In my main pgm i have this statement that is calling my mail program.
It works fine UNLESS i have a user like:
tim.o'(e-mail address removed). When my user is just like
(e-mail address removed) then its fine. The error is "Illegal
character in prototype for main::SendMail : $,$,$ "
&SendMail($eml,$mail_text,$mail_sub);
sub SendMail($,$,$)
{
#who the email is being sent to
my $To = shift;
#the message body
my $mymsg = shift;
#the mail subject
my $mysubject = shift;
#From email address
my $from = "me\@somecompany.com";
my $msg = new MIME::Lite
To =>$To,
From =>$from,
Subject =>$mysubject,
Type =>'text/html',
Data =>$mymsg;
$msg->send;
}
Should I be putting these 3 vars in an array and then using that
array?
Thanks for your help. Mike
sub.
In my main pgm i have this statement that is calling my mail program.
It works fine UNLESS i have a user like:
tim.o'(e-mail address removed). When my user is just like
(e-mail address removed) then its fine. The error is "Illegal
character in prototype for main::SendMail : $,$,$ "
&SendMail($eml,$mail_text,$mail_sub);
sub SendMail($,$,$)
{
#who the email is being sent to
my $To = shift;
#the message body
my $mymsg = shift;
#the mail subject
my $mysubject = shift;
#From email address
my $from = "me\@somecompany.com";
my $msg = new MIME::Lite
To =>$To,
From =>$from,
Subject =>$mysubject,
Type =>'text/html',
Data =>$mymsg;
$msg->send;
}
Should I be putting these 3 vars in an array and then using that
array?
Thanks for your help. Mike