Jump to content

Sending mails to more than hundred persons through mail()


name1090

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.