Sending mail from cgi
Posted on 2000-02-17
I use sendmail program to send mails from my CGI program, like this:
open(SEND_MAIL, "|/usr/sbin/sendmail -t");
print SEND_MAIL "To\: $to\n";
print SEND_MAIL "From\: $from\n";
print SEND_MAIL "Subject\: $subject\n\n";
print SEND_MAIL $body;
print SEND_MAIL "\n\n";
When the mail reaches the recipient, the "to", "from" etc values are all correct, just as I had given, but in the header, I see the "return-path" as "nobody". I want the "from" address itself to be seen as the return-path.
What can be done?