473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP mass emailing and handling bounces

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.

Any other suggestions, ideas?
..soma
Jul 17 '05 #1
3 3115
>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.

Any other suggestions, ideas?


*IF* you can arrange it, point your reply-to address to a mailbox
hosted on a server that supports .forward files or aliases that
pipe into a program. (Linux or BSD host running Sendmail, Smail,
Exim, or similar). Your program (which could be standalone PHP if
it's available) gets invoked with the bounce as standard input. It
reads the headers, finds the coded info you stuck in the header to
indicate who you sent to, and uses it to flag and/or delete bouncing
addresses in your database.

There's no need for polling a pop3 box. It takes no CPU time if
nothing bounces. However, if you're doing this on a cheap hosted
web site, it's probably difficult to get this kind of access.

Gordon L. Burditt
Jul 17 '05 #2
"Gordon Burditt" <go***********@burditt.org> wrote...
*IF* you can arrange it, point your reply-to address to a mailbox
hosted on a server that supports .forward files or aliases that
pipe into a program. (Linux or BSD host running Sendmail, Smail,
Exim, or similar). Your program (which could be standalone PHP if
it's available) gets invoked with the bounce as standard input. It
reads the headers, finds the coded info you stuck in the header to
indicate who you sent to, and uses it to flag and/or delete bouncing
addresses in your database.

There's no need for polling a pop3 box. It takes no CPU time if
nothing bounces. However, if you're doing this on a cheap hosted
web site, it's probably difficult to get this kind of access.


Thank you Gordon,

I was thinking about something like that, but you formulate it much better
than the vague concept I had in mind.

While I might be able to get that level of server access on my current
project I'd like to create something that is portable to less luxurious
environments as well for the sake of re-use.

What do you think of my other idea? Is it doable or am I overlooking
something major? I don't think that cpu time will be a issue. After all
there are quite a few web-based email systems written in php (SQWebmail,
Horde, ...) - I've never experienced any performance issues with those...

..soma
Jul 17 '05 #3
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
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pilu | last post by:
Hi, I have to send a newsletter to more then 8000 address! What is the best way to do it? sending all together?, with mail() function?, with smtp?, divided in groups....??? tnx so much!
6
by: Bengt Richter | last post by:
It seems lately all my posts have been coming back to me as bounced emails, and I haven't emailed them ;-( I've been getting bounce messages like (excerpt): .......
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
3
by: Strasser | last post by:
In Access2000 mass emailing worked perfectly (very powerful tool!). Doesn't work when using XP version of both Access and Outlook, even though I checked the box to ensure that I was sending the...
2
by: Stanley Cheung | last post by:
Hi all, I am developing the application for send emailing list, actually, i can perform to send a email 1 by 1 and do it on aspx page. I have a enquiry that how can the application change to...
5
by: Elmo Watson | last post by:
I'm having weird problems emailing on the Win2003 Staging environment - - the same script runs on multiple other computers, but on this one, the smtp service is running, but when the send is done...
2
by: Bob Alston | last post by:
I am looking for suggestions for software or access code or utilities to assist in doing mass emailings from an Access database. The emailings would likely be a few thousand at a time. Generally...
2
by: forrestgump | last post by:
I am curently trying to find a way of sending out mass emails from access. I have located VBA for generating emails directly into outlook but I have to click send on each one. Is there a way so the...
11
by: PokerMan | last post by:
I need to email my client database of emails, but doing this is just too slow: ...pseud code while(have emails) { //fetch email //preinitialised smtpclient object with host and message used...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.