ManicMax Posted August 5, 2009 Share Posted August 5, 2009 Hello I'm looking for some advice and maybe a point in the right direction. I understand how to use the PHP mail() function, but I would like some advice on how to use this to send to large volumes of people from a hundered to maybe a few thousands. I'm guessing I should use a loop function and if I did this I might be able to have a counter on the page like 1 out of 100 sent and increment as it sends. I also am guessing that the page the script is run off would have to also stay open until it was completed. All help is welcome. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/ Share on other sites More sharing options...
ToonMariner Posted August 5, 2009 Share Posted August 5, 2009 yes a loop is one way of doing it however - you will probably get your server black listed quickly. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891662 Share on other sites More sharing options...
ManicMax Posted August 5, 2009 Author Share Posted August 5, 2009 What this is for is to send updates to members of a site. I'm guessing it will be lets say an email every few days to around 25 -75 users at first, but these arbitrary amounts could greatly increase. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891665 Share on other sites More sharing options...
machiavelli1079 Posted August 5, 2009 Share Posted August 5, 2009 I store my mailing list preferences with my user information in my customers mysql table. Then, for html mailers, I do something of the sort: $results=mysql_query("SELECT * FROM ".CUSTOMER_TABLE." WHERE optin='yes'"); while($row=mysql_fetch_assoc($results)) { generate_mail_to($row['useremailaddress']); } where generate_mail_to($email) actually generates and sends the e-mail That's a little sloppy and I don't recommend copy/pasting because there is no error checking whatsoever, but it's the most efficient way I've found to send an html mailer to my client's customers easily, while preserving the customers' ability to optout of mailers. I also include an unsubscribe link in each email. You don't want to get your domain (or worse, your client's domain) blacklisted for spamming. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891729 Share on other sites More sharing options...
ManicMax Posted August 5, 2009 Author Share Posted August 5, 2009 So if I add the optout it will mean I should not get blacklisted? Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891734 Share on other sites More sharing options...
ldougherty Posted August 5, 2009 Share Posted August 5, 2009 You should see if your web host offers some type of list server option you can use. A list server will specifically sent out messages in groups and generally the sever administrator has taken precautions to attempt keeping the server from being blacklisted. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891735 Share on other sites More sharing options...
machiavelli1079 Posted August 5, 2009 Share Posted August 5, 2009 So if I add the optout it will mean I should not get blacklisted? My understanding in a corporate environment is that if you are sending e-mail to people that have not agreed to receive e-mail from you, you are spamming them. If enough people complain (ie if your mail is marked as junk in hotmail, gmail, etc), your domain will eventually be marked as a spamming domain. As far as I know, you can't get spam listed if you send 100s of emails unless people are reporting you as a spammer - but don't quote me on any of this - it's just my perspective, and my scope is limited to the company I work for and our experience with html mailers. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891741 Share on other sites More sharing options...
ManicMax Posted August 5, 2009 Author Share Posted August 5, 2009 All these people are signing up specifically to recieve these emails. Could someone explain more about this server I could route my emails through. I will most likely be using GoDaddy as my clients host. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891742 Share on other sites More sharing options...
ldougherty Posted August 5, 2009 Share Posted August 5, 2009 "As far as I know, you can't get spam listed if you send 100s of emails unless people are reporting you as a spammer" This actually is not entirely correct. Some mail servers also implement a rate limit meaning if you are hitting their mail servers with an excess amount of connections regardless of being legit mail or not the outbound server IP will be temporary blacklisted. Link to comment https://forums.phpfreaks.com/topic/169002-large-volume-email-script/#findComment-891750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.