Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

I'm not getting bounced mail

the mail() function

Moderators: macek, egami, gesf

I'm not getting bounced mail

Postby nippon » Thu Sep 01, 2005 9:27 pm

the code i used is


$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

$headers .= "Reply-To: nipun <constant@constantimpact.com>\r\n";
$headers .= "Return-Path: nipun <constant@constantimpact.com>\r\n";
$headers .= "From: nipun <constant@constantimpact.com>\r\n";

$headers .= "Return-Receipt-To: <nipun45@gmail.com>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "Disposition-Notification-To: <nipun45@gmail.com>\r\n";
$headers .= "X-Mailer: PHP(".$_SERVER['REMOTE_ADDR'].")\r\n";

if (imap_mail ("shouldbounce@bouncesddafsdf.com","subject ","message",$headers))
echo" OK";


I also used the next code


imap_mail ( "bounce@sfsdjdkse.com", "subject", "message",$headers,"-fnipun45@gmail.com");



But its not working either. it is just like adding a cc:

Please anybody if u know the better solution.
nippon
New php-forum User
New php-forum User
 
Posts: 4
Joined: Thu Sep 01, 2005 8:26 pm

Postby Alexej Kubarev » Fri Sep 02, 2005 4:27 pm

how about using mail() instead of imap_mail()
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby nippon » Sat Sep 03, 2005 7:56 pm

Ya using mail() works but my boss wants me to use imap_mail(). does anybody knows the solution to receive bounce mails using imap_mail().
Now i know that imap_mail() can have 7 parameters and the fifth one is for cc. so the following code does not work.

imap_mail ( "bounce@shouldsdf bounce.com", "subject",
"message",$headers,"-fmy@address.com")
nippon
New php-forum User
New php-forum User
 
Posts: 4
Joined: Thu Sep 01, 2005 8:26 pm

Postby gesf » Sat Sep 03, 2005 9:04 pm

Do you really have an IMAP account ?
imap_mail() function doesn't have that fifth 'additional_parameters' parameter as mail().
Try adding your Envelope-Sender in the header part of the email.
What's the OS/Web Server you're working under ?
User avatar
gesf
Moderator
Moderator
 
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.