my $email = populateEmail("test"); print $email; open(SENDMAIL, "|/usr/lib/sendmail -oi -t -i") or print "cannot open SENDMAIL: $!"; print SENDMAIL <<"EOF"; From: <[EMAIL PROTECTED]> 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 "[EMAIL PROTECTED]" ie To : [EMAIL PROTECTED] it works fine. populateEmail function's code is available below: populateEmail { if(lc($_[0]) eq "test") { return ("[EMAIL PROTECTED]"); } } Can anyone spot the bug? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/