Re: php mail() question

From: Date: Tue, 16 Dec 2003 04:21:20 +0000
Subject: Re: php mail() question
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32063@lists.php.net to get a copy of this message
Hello, On 12/15/2003 10:23 PM, Jerry wrote:
Thanks for that. That's hitting the nail right on the head. But I need a bit of PHP code to talk to mysql and only read the "from" part of the email and use a query to check the database if the entry is there. If it is than flag it, if not skip it and delete the email. So would I need to edit the code to make the from section a input form or can I somehow get a query to get the from data from plain text? All I want is the from address, the rest I don't really need. So.... UPDATE users SET flag='y' WHERE email='$from_address'; Might even output something to make sure it was sucessful or not. What I need to know is how I get the from address?
That's tricky. What I do is to have a catch-all mailbox for my site domain. So, every message sent to a mailbox that does not really exist will be dropped in that catch-all mailbox. When I send messages to each user, I make the return path address be set to something like errors-user=domain@mysite.com . For instance, messages sent to jusa_98@yahoo.com by the PHP Classes site, will have the return path set to errors-jusa_98=yahoo.com@phpclasses.org . Since these address really do not exist, they will be dropped in the catch-all mailbox for that domain. So, all I need to do is to run a script that polls the POP3 mailbox of my catch-all account and parse the To: address of the bounced messages to figure the subscriber address that is bouncing. Not all bounce message will have the To: address set correctly. The remaining message should be ignored. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.db (#32063) next »