name1090 Posted June 16, 2008 Share Posted June 16, 2008 Iam currently doing a PHP project for my school. In that i need to send mails to all students daily or frequently. Total number of recipients will be more than two hundred. i decided to make a for loop for sending mails. there by putting mai function into the for loop to send to all recipients stored in an array. But i have noted a warning in PHP document that : Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. So, Is my implementation correct or not? I am not interested in saving time. But i have to make sure that all students receive their daily mails. Pls provide your suggestions..... Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/ Share on other sites More sharing options...
webent Posted June 16, 2008 Share Posted June 16, 2008 Why not use a mailing list, that is what it is designed for? ... Certainly not the php mail function... Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566533 Share on other sites More sharing options...
name1090 Posted June 16, 2008 Author Share Posted June 16, 2008 whats that mailing list? How to use it? Please give details..... Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566579 Share on other sites More sharing options...
webent Posted June 16, 2008 Share Posted June 16, 2008 Are you using Cpanel for your web hosting control panel? Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566632 Share on other sites More sharing options...
rhodesa Posted June 16, 2008 Share Posted June 16, 2008 before you get into that...is each email customized per person? if so, using groups won't work using mail() inside a loop is perfectly fine by the way, but as PHP specifies, it opens a new connection for each call. i don't believe there is a way (in PHP) to do it all in one connection Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566659 Share on other sites More sharing options...
name1090 Posted June 16, 2008 Author Share Posted June 16, 2008 No cpanel Content in each mail changes per person like user name, some special details about each students.... like that in some circumstances only. But in most of the times, the content wont change. for example, there will be an invitation to be sent to all students weekly. in this case there will be no change in content. So please tell me how to send mails as a group. And for unidentical mails while using 'for' loop, whether mail delivering is ensured or not. Chances of all students getting mail is large. right? Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566708 Share on other sites More sharing options...
jonsjava Posted June 16, 2008 Share Posted June 16, 2008 I've written a script (RFC Complaint), which does what you need: http://sourceforge.net/projects/mailgroup Link to comment https://forums.phpfreaks.com/topic/110422-sending-mails-to-more-than-hundred-persons-through-mail/#findComment-566822 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.