Forum Moderators: coopster
For example, some packages use sendmail and others use POP. I'm using sendmail because it's simpler. But is there some advantage to using POP?
Also, I don't know if there's some reason I should send the messages out slowly or rather as fast as the script can output them. I'm just using a for..next loop, sending a unique message to each subscribed user. There are only about 100 users on the first list I'm getting up but I imagine some lists could climb as high as 10,000.
Anything else I'm missing that could bite me? Thanks for your help.
For example, some packages use sendmail and others use POP.
POP (or POP3) is a protocol for retrieving email. Do you, perhaps, mean SMTP? If the choice is between using sendmail and SMTP, I'd say use sendmail. (Using the SMTP protocol directly from php will use your webserver as a mailserver. I have seen this take websites down.) If you do mean POP, please give some more info. (I don't see how that would work, but I may be having a senile moment.)
Also, I don't know if there's some reason I should send the messages out slowly or rather as fast as the script can output them.The answer to this will partly depend on whether you intend the code strictly for personal use or want to release it. If you are the only one using it, adjust it to your needs/server environment. If you do plan on releasing, it would be a good idea to have the be a setting the user can adjust.
Off the top of my head I can think of two main reasons to not send as quickly as the script will process.
1. Email (the sendmail server specifically) is a disk intensive activity. You really don't want to have thousands of messages in queue because your php code cycles tens of times faster than sendmail can actually deliver the email.
2. Some large email providers (specifically yahoo, but perhaps others) will begin rather draconian rate limiting one you have tried sending to a certain number of their addresses in, say, an hour. This gets much worse if any of those addresses are non-deliverable.
3. Because of (1) sending large volumes of email can lead to high loads on the server.
Make the default behavior of the software to remove addresses that return a 500 class smtp error. Ensure that emails are sent such that you _know_ which email address you sent to even if the email is getting bounced from a victim receiving an unrequested blind forward. (This way you can remove them even if they have no idea of the subscription address.)
Personally, I'd be more in favor or adapting an existing program that creating one from scratch. That being said, I've never looked as the code for dadamail or phplist, so I have no clue how difficult adapting either would be.
I did mean SMTP. The reason I said POP was that you have to have a POP account to send mail through SMTP (I think -- at least that's the way one of the packages I looked at does it.)
I'll send out messages once every 5 seconds to keep from overloading the server. Incidentally, I don't think this matters, but I'm actually using Perl, not PHP. I posted in this forum because I believe my project is language-agnostic and this forum has a lot more activity than the Perl forum.
I will have the messages say "This message was send to [some address]" at the bottom of each message. That's a good suggestion.
Processing bounces seems to be an even bigger programming project than coding the mailing list itself! I could only find one off-the-shelf bounce handler, done in PHP. I'm going to spend a few hours seeing if I can integrate it into my project, and if I can't, I guess I'll try to roll my own.
Thanks again for the help!
I'll send out messages once every 5 seconds to keep from overloading the server.
Certainly the rate at which you are allowed to send out email will be controlled by the server. And shared servers will probably be less. A shared webhost that I currently use a lot states they limit outgoing email to 500/hr.