hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : How to send thosands of mails efficiently
Reply

Forum Jump

How to send thosands of mails efficiently

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-05-2004, 08:19 AM
saeed saeed is offline
Newbie
 
Join Date: Feb 2004
Posts: 23

How to send thosands of mails efficiently


Hi,
i hav to send some promotional mails to thousands of users after every 15 days, there are 7 to 8 different types of mail which goes to every customer in a particular order....can u tell me how can i optimize this process coz there are arroned 2 to 3 lacks users and i dont want to send all of them at once, i m trying to make a webservice which execute after every 1 hour, but facing one one problem how to break the number of records, dont want to make a temporary table..
thx



Sponsored Links
  #2  
Old 04-05-2004, 08:53 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
If it's legitimate marketing (opt-in) email your best bet is a decent list server, although they aren't cheap, but they do at least have their own SMTP servers to balance the load and handle unsubscribe requests and bounces automatically for you.

  #3  
Old 04-05-2004, 03:39 PM
Quickcess Quickcess is offline
Newbie
 
Join Date: Mar 2004
Posts: 19
hello!
If you have unique id assigned to each of your addresses you might consider creating doing the following:
1. script send messages to 300 users (just an example number) starting from the very first from your base
2. script outputs the id of last user to a file (e.g. lastuser.php)
3. after 1 hr go to step 1 and repeat starting from the id read from lastuser.php

The solution might increase your server load a bit but that's not an issue since the database is relatively not big and requests are made only once an hour.

P.S. PHP gurus, please, don't kick me It's just a try

Sponsored Links
  #4  
Old 04-05-2004, 03:59 PM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Quote:
Originally posted by Quickcess
hello!
If you have unique id assigned to each of your addresses you might consider creating doing the following:
1. script send messages to 300 users (just an example number) starting from the very first from your base
2. script outputs the id of last user to a file (e.g. lastuser.php)
3. after 1 hr go to step 1 and repeat starting from the id read from lastuser.php

The solution might increase your server load a bit but that's not an issue since the database is relatively not big and requests are made only once an hour.

P.S. PHP gurus, please, don't kick me It's just a try
It really depends on how many addresses there are, whilst it might not put a load on your PHP script it has got a good chance of loading your SMTP or mail program.

If it's only 300 an hour then it would probalby be fine, so long as you don't have a PHP exeuction timeout that you reach!

  #5  
Old 04-07-2004, 12:50 AM
Tom|420 Tom|420 is offline
Junior Guru
 
Join Date: Jun 2002
Location: Sherbrooke, Québec
Posts: 182
What about loading the list into a SQL database? You could then use a column which acts as a flag to tell wether or not the mail was sent out. Send one bunch of mails with (example):

SELECT * from SOMEDB WHERE sent='no' LIMIT=300

Just an idea, never tried myself.

Also you should give a short dalay between each e-mail sent (200 ms is enough) to let the SMTP server relax a bit and not monopolize it. You should also make sure that you're script won't expire (by default a script is stopped after 30 secs).

  #6  
Old 04-08-2004, 05:57 AM
MiSV MiSV is offline
Newbie
 
Join Date: Apr 2004
Location: Israel
Posts: 17
Yeah, we do that. The actual system is way more complicated though; there are normalized tables for types of emails to send, a scheduler and, a bot that oversees load, bounce messages, scheduling, and the cron job that performs the scheduled tasks..

  #7  
Old 04-17-2004, 01:17 PM
=-D =-D is offline
Junior Guru
 
Join Date: Nov 2002
Posts: 202
what you need is pear's mail_queue. the forum gay'ed me saying i cant post url's until i post 5 messages O_o.. so just google this "pear mail_queue", you'll get it

enough said

Reply

Related posts from TheWhir.com
Title Type Date Posted
ReadySpace Taps Bulletin for Application-to-Mobile Text Messaging Suite Web Hosting News 2014-02-21 16:48:38
Website Publishing Platform Squarespace Integrates E-Commerce Shipping Solution Web Hosting News 2013-11-27 16:23:36
Security Experts Refute German Email Security Firms Secure Data Storage Claim Web Hosting News 2013-08-13 16:24:48
The Options for Blocking Outbound Spam: The Status Quo Blog 2013-06-06 14:08:10
Rackspace Integrates Mailgun into Cloud Control Panel Web Hosting News 2013-05-23 14:55:51


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?