Re: Return-Path header and sending email with php
| From: | Marek Kilimajer | Date: | Mon, 26 Jan 2004 12:06:02 +0000 |
| Subject: | Re: Return-Path header and sending email with php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175745@lists.php.net to get a copy of this message | ||
You can use a class that sends mails by connecting directly to smtp server, e.g. http://www.phpclasses.org/mimemessage
Chris Balay wrote:
Good Day Coders - I have built a newsletter program with php. It sends out an e-mail to a couple thousand subcribers every day. All works well. My problem is that I have know way of finding out which e-mails are not being delivered successfully. My code is as follows: $to = stripslashes($row3["email_address"]);$subject = stripslashes($row3["name"])."'s Curmudgeon-Online for ".date("F j, Y"); $message = stripslashes($row3["name"])."'s Curmudgeon-Online daily e-mail for ".date("F j, Y")."-------------------------------------------------------------- ".$quotes;$headers = "From: The Curmudgeon-Online <sender@curmudgeon-online.com>\r\n";$headers .= "Return-Path: sender@curmudgeon-online.com\r\n"; $headers .= "Reply-To: <sender@curmudgeon-online.com>\r\n";mail($to, $subject, $message, $headers);This generated the following headers: Return-Path: <www@ftp.pezcandyinc.com> Received: from [127.0.0.1] (HELO ftp.pezcandyinc.com) by whiteplume.net (CommuniGate Pro SMTP 4.1.5) with ESMTP id 1692872 for chris.balay@gawpus.com; Sun, 25 Jan 2004 04:03:25 -0500 Received: by ftp.pezcandyinc.com (8.12.9/8.12.9/Submit) id i0P93PqY017724;Sun, 25 Jan 2004 04:03:25 -0500 (EST)Date: Sun, 25 Jan 2004 04:03:25 -0500 (EST) Message-Id: <200401250903.i0P93PqY017724@ftp.pezcandyinc.com> To: chris.balay@gawpus.com Subject: Chris Balay's Curmudgeon-Online for January 25, 2004 From: The Curmudgeon-Online <sender@curmudgeon-online.com> Reply-To: <sender@curmudgeon-online.com> as a result any undeliverd messages are routed to www@ftp.pezcandyinc.com, an address that does not exists. Is there any way to change the return-path header? Yours, Chris Balay