Help Regarding Bounced Mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
itsmeArry
Forum Newbie
Posts: 3
Joined: Fri Feb 23, 2007 3:51 am

Help Regarding Bounced Mail

Post by itsmeArry »

I am not recieving bounced emails.
Here is the situation:
I have 2 dedicated servers. If I send mail from 2nd server I am recieving bounced mail at the bounced@domain1.com, but when I send mail from the 1st server I am not recieving mails at bounced@domain2.com. I have given the bounced address in the mail header.

I am using PHP 4.3 and Exim is being used on 2nd server and sendmail on Server1
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
itsmeArry
Forum Newbie
Posts: 3
Joined: Fri Feb 23, 2007 3:51 am

Post by itsmeArry »

d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

itsmeArry wrote:
d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.
But, I mean, exactly how. Can you should me the code? You need to pass some extra paramters to mail() for this so that sendmail on UNIX systems doesn't try sending it from the www user.

Code: Select all

"-oi -f " . $return_path
Have you looked at using a mailing library like Swift Mailer?
itsmeArry
Forum Newbie
Posts: 3
Joined: Fri Feb 23, 2007 3:51 am

Post by itsmeArry »

d11wtq wrote:
itsmeArry wrote:
d11wtq wrote:How are you "giving" the bounce-detect address? If you're simp,y setting Return-Path: in the headers it's not reliable. You need to truly MAIL FROM: <> the address at SMTP-time.
I am using php's mail function there I am setting the Return Path. and in Mail From the address is of a particular user.
But, I mean, exactly how. Can you should me the code? You need to pass some extra paramters to mail() for this so that sendmail on UNIX systems doesn't try sending it from the www user.

Code: Select all

"-oi -f " . $return_path
Have you looked at using a mailing library like Swift Mailer?
i am using this code:
$returnpath = "bounced@domain2.com"
if ($returnpath)
{
$returnpath = "-f$returnpath";
$res = mail($emailto, $subject, $messagepart, $headers,$returnpath);
}
Post Reply