Sendmail
[email protected] (Perl CGI script enhancer)
| Newsgroups | perl.beginners.cgi |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <a8f039a0-5834-4a19-913b-3799cf377ee5@n14g2000pri.googlegroups.com> |
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?