Hi ,
In mail function Iam using different mail id's for from address and return path but while sending mail the failiure delivery is redurned to from address instead of return path email.
this is the script what i use
<?php
$from_name = "sateesh";
$from_email = "sateesh@metafusion.com";
$to_name = "recipient";
$to_email = "recipient@someserver.com";
$subject = "MY Subject";
$returnpath = "bounce@namecastle.com";
echo $return;
$headers = "From: ".$from_name."<".$from_email.">\n";
$headers .= "Reply-To: <".$from_email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"---- =MIME_BOUNDRY_main_message\"\n";
$headers .= "X-Sender: $from_name<$from_email>\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-path:<".$returnpath.">\n";
$message .= "This is the Mesage";
mail("$to_name<$to_email>", $subject, $message, $headers);
?>
this is the message what i received after failure delivery to sateesh@metafusion.com
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
recipient@someserver.com
unrouteable mail domain "someserver.com"
------ This is a copy of the message, including all the headers. ------
Return-path: <sateesh@metafusion.com>
Received: from nobody by server.gensis.com with local (Exim 4.24)
id 1AiUne-00055v-HT
for recipient@someserver.com; Mon, 19 Jan 2004 03:30:22 -0500
To: recipient<recipient@someserver.com>
Subject: MY Subject
From: sateesh<sateesh@metafusion.com>
Reply-To: <sateesh@metafusion.com>
MIME-Version: 1.0
Content-Type: multipart/related; type="multipart/alternative"; boundary="---- =MIME_BOUNDRY_main_message"
X-Sender: sateesh<sateesh@metafusion.com>
X-Mailer: PHP4
X-Priority: 3
Message-Id: <E1AiUne-00055v-HT@server.gensis.com>
Date: Mon, 19 Jan 2004 03:30:22 -0500
This is the Mesage
we are checking bounced mail in our software
please healp me
Thanks and regards
nanban