Hello,
on 06/14/2005 10:28 AM somaboy mx said the following:
I'm putting together a mass mailing application for sending out newsletters
from a site admin area (no spam).
I'm wondering how I can automate the removal of bounced addresses in this
application. The ideal situation would be that returning mail triggers a
script that removes the address of said message's recipient from the list.
I'm thinking about a script that checks the pop3 server of the reply-to
address and parses the inbox to look for returned mail and removes those
addresses from my database. This script could be run periodically as a cron
job or everytime before sending out the next mailing.
Yes, I do that all the time and it works very well. I use this pop3
client class for that porpose:
http://www.phpclasses.org/pop3class
Beware of solutions that hang on procmail, .qmail, etc.. because if your
script has a bug that makes it not process the messages imediately, you
may be choking or loosing your incoming e-mail. Polling a POP3 mailbox
is safer as you never loose messages.
What you need to do is not to set the Reply-To: header but the return
path address. Return path address is not set by an header. It depends on
the method you are using to send messages.
You may want to take a look at this class for composing and sending
messages correctly in a way that it prevents being confused with spam.
It can set the return path address correctly regardless the method you
use for delivery. It supports several different methods.
It also has a means to optimize deliveries for bulk mailing. I use this
class to send almost 4 million messages a month from the same site. See
the SetBulkMail function and message body caching support:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html