Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a bounce address for sendmail

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi. I'm using "sendmail" in a perl cgi to send emails to members of a list.

The mail routine looks something like this:

$mail = '/usr/sbin/sendmail';
sub send_email
{
open(MAIL, "|$mail -t");
print MAIL "To: $emailto\n";
print MAIL "From: $emailfrom\n";
print MAIL "Subject: $fields{'subject'} $fields{'status'} $fields{'eaddress'} \n";
print MAIL "\n===================HI THERE=======================\n";
close MAIL;
}

That all works fine except if a message is returned or "bounces back" - because I get no notification.

If a message "bounces back" due to an incorrect $emailto, I want the bounceback message to be sent to $emailfrom

Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top