Front page | perl.beginners.cgi |
Postings from April 2008
Sendmail
Thread Next
From:
Perl CGI script enhancer
Date:
April 10, 2008 02:53
Subject:
Sendmail
my $email = populateEmail("test");
print $email;
open(SENDMAIL, "|/usr/lib/sendmail -oi -t -i") or print "cannot open
SENDMAIL: $!";
print SENDMAIL <<"EOF";
From: <deepan\@juniper.net>
To:${email}
Subject: [SUSTAINING TICKET] Case
Content-type: text/html
testing..
EOF
close(SENDMAIL);
When i a using the above code it results in "No recipient address
found in header" and when i replace ${email} with "dpr.17\@gmail.com"
ie
To : dpr.17\@gmail.com it works fine.
populateEmail function's code is available below:
populateEmail {
if(lc($_[0]) eq "test") {
return ("deepan.ignatius\@gmail.com");
}
}
Can anyone spot the bug?
Thread Next
-
Sendmail
by Perl CGI script enhancer