Solved

bounce header for PHP mail script

Posted on 2001-06-13
7
289 Views
Last Modified: 2012-06-27
Hello All,
I have a script that sends email (Sendmail), but I would like the bounces to go a particular mailbox.  What is the header that I use to do this?  I thought it might be Return-Path, but this didn't seem to work for me.  If you have something that works, feel free to post the code.  If you could provide me with a link to the location on the sendmail site that gives a listing of headers and what they do, that would be great.

Thanks,

Tom
0
Comment
Question by:tom419
7 Comments
 
LVL 4

Expert Comment

by:ykf2000
ID: 6189150
HI

try editing your php.ini file and change the sendmail command line to

sendmail -t -f thebouncemail@yourdomain.com
0
 

Expert Comment

by:Curieux
ID: 6190554
Hi,

Perhaps you want only this script to use a particular bounce address. So it wouldn't be a good idea to fix it in the php.ini.
I suggest doing this:

$mail_header  = "FROM: $your_email \n";
$mail_header .= "REPLY-TO: $bounce_email \n";


mail($receiver_email,$subject,$mail_text,$mail_header);

Regards
0
 

Accepted Solution

by:
Curieux earned 200 total points
ID: 6190569
Oops a little mistake in my code above:

$mail_header  = "FROM: $your_email \n";
$mail_header .= "REPLY-TO: $return_email \n";
$mail_header .= "RETURN-PATH: $bounce_email \n";

mail($receiver_email,$subject,$mail_text,$mail_header);

;)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:higijj
ID: 6190838
What's the bounce email for?

the REPLY-TO I got it.. but RETURN-PATH ?
0
 

Author Comment

by:tom419
ID: 6191354
The idea being that if a message is sent to an invalid address or some other problem that causes it to be returned, I want it to be returned to a particular address.  True, I could just send the message with the 'bounced email' address as the From address, but then people couldn't just reply to the email.

Curieux: I thought I tried this once before, but I'll try your code and do it again.  I figured RETURN-PATH was it for me, but it just didn't seem to work last time.

Thank you everyone for your help.

Tom
0
 

Expert Comment

by:Curieux
ID: 6191678
Tom419 here's the page on sendmail.org for the headers:
http://www.sendmail.org/rfc/0822.html

Good luck :o

Curieux
0
 

Author Comment

by:tom419
ID: 6195626
Curieux:
This worked for me after all!  And thanks for the link to the Sendmail headers.  I appreciate your help.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Healthcheck 2 85
count download link and run update query 9 57
Site hacked - decoding the PHP? 15 66
Method for submitting dynamically created rows 20 17
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now