waynew Posted September 2, 2009 Share Posted September 2, 2009 I need to create a newsletter script that doesn't kick the crap out of the server that it's on. I know that looping the mail function is a stupid idea. I found this article just a few moments ago and I'm just wondering if it's an ok method to use? Or should I go with something better? Any links to good classes etc would be great. Quote Link to comment https://forums.phpfreaks.com/topic/172890-php-mass-mail/ Share on other sites More sharing options...
Daniel0 Posted September 2, 2009 Share Posted September 2, 2009 Dunno what the article says, but you'll want to use something that doesn't open and close the connection to the SMTP server constantly (like mail()) does. You might even want to put some of the mails in a queue to restrict the number of emails you send out per X units (e.g. you might only want to send out 300 emails per hour). Quote Link to comment https://forums.phpfreaks.com/topic/172890-php-mass-mail/#findComment-911234 Share on other sites More sharing options...
waynew Posted September 2, 2009 Author Share Posted September 2, 2009 Basically the article says that you should so something like this: Send an email to a dummy email address, while BCC'ing the list of emails. Quote Link to comment https://forums.phpfreaks.com/topic/172890-php-mass-mail/#findComment-911236 Share on other sites More sharing options...
TheFilmGod Posted September 3, 2009 Share Posted September 3, 2009 there is an even more efficient way of doing this. You will need a dedicated server and need a hosting provider who will let you setup email forwarding. Since this list is static (not going to change) you should create a unique, hard to guess email address that will automatically forward the email to everybody. The initial setup will be pain in the ass, but once you do the intial setup sending subsequent emails would be a piece of cake - and you could even do it from the convience of your own email account! There are several tricks though - you need a dedicated smtp email forwarding system setup with your dedicated host. Moreover, the email forwarding address needs to be hard to guess. And people should NOT know what that address is when you send the email out. I know this sounds a lot more complicated than a simple php function, but this is definitely the most efficient way of doing it. BY FAR. Quote Link to comment https://forums.phpfreaks.com/topic/172890-php-mass-mail/#findComment-911414 Share on other sites More sharing options...
waynew Posted September 3, 2009 Author Share Posted September 3, 2009 Thanks. The only problem though is that this newsletter system is going to be deployed on a few websites (admin login etc), so I'm doubtful that any of them will have dedicated hosting. Most-likely shared hosting. I'm guessing that since they're small businesses, that they won't have too many people to email. Quote Link to comment https://forums.phpfreaks.com/topic/172890-php-mass-mail/#findComment-911486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.