Jump to content

Large Volume Email Script


ManicMax

Recommended Posts

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

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

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

"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
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.