TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-01-2010, 10:49 PM   #1 (permalink)
The Contributor
 
pipesportugal's Avatar
 
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
pipesportugal is on a distinguished road
Default Tips for sending large number of emails with php

Hello dear colleagues from talkPHP forum,

After sometime making routines with php I am now at the point of having the need to integrate with some of my routines the capability of sending large volume of emails (like newsletters) to people that are signed on the reserved area of our company.

I know that there are many (also free) software php tools to perform this task, but I want to do it myself and also learn the tricks of doing it.

The first problem to arrise was the fact that the host provider limits the sending of emails to a maximum very low quantity per hour.

So my request with this thread was for the programmers signed up in this forum to give their suggestions of how to overpass this server quantity limitation.

Let's imagine the following situation:
a) I need the send 3.000 newsletter emails.
b) The maximum server quantity would be for example of 200 emails per hour.

My first suggestion would be to create a cron job running at each 30 minutes sending 5 emails with 20 addresses at Bcc.
This would take 15hours to send the full 3.000 emails.

I would like to hear here at the talkphp forum some other suggestions for doing this job with the above numbers/limitations.

A fantastic 2010 to all,
pipesportugal
pipesportugal is offline  
Reply With Quote
Old 01-02-2010, 11:09 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

You are at the mercy of your host, they monitor the mail ports so there are no alternate ways around this. If you need to send this many emails, get a different host. Dedicated is really the best way to because you can choose everything for yourself.
__________________

Village Idiot is offline  
Reply With Quote
Old 01-02-2010, 11:59 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Quote:
Dedicated is really the best way
I think what he meant to say is VPS. Dedicated is ridiculously expensive, with very little benefit over VPS unless you're running an extremely large site. Check out Linode, or prgmr.com, both are excellent providers.




delayedinsanity is offline  
Reply With Quote
Old 01-03-2010, 02:45 AM   #4 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by delayedinsanity View Post
[font=&quot]

I think what he meant to say is VPS. Dedicated is ridiculously expensive, with very little benefit over VPS unless you're running an extremely large site. Check out Linode, or prgmr.com, both are excellent providers.
VPS can be a worthwhile switch, but I've actually never worked with it though so its not the first thing that comes to my mind. At work we have a number of servers both at a colocation site and in our buildings (the local ones are for internal uses).
__________________

Village Idiot is offline  
Reply With Quote
Old 01-03-2010, 03:51 AM   #5 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

It's a great solution for those of us running our own. Despite being a shared environment, I've yet to come across a situation that's been detrimental to the reliability of any of my servers (running seperate web, database and email).

Arguably the best feature is the low barrier to entry - VPS are relatively cheap for the type of hardware you get at your disposal.
delayedinsanity is offline  
Reply With Quote
Old 02-28-2010, 08:29 PM   #6 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 17
Thanks: 0
Rhinos is on a distinguished road
Default

If you cannot move to a dedicated server or VPS then the way you suggested is okay, however you have to be aware that if you try and do the limit each hour any other emails that your application may send out will count towards your hourly limit. So if you use emails to send out confirmation emails for registration or with the members randomly generated password then you need to rethink how many you send out each hour.
Rhinos is offline  
Reply With Quote
Old 05-20-2011, 09:02 PM   #7 (permalink)
The Wanderer
 
clonepal's Avatar
 
Join Date: May 2011
Posts: 10
Thanks: 1
clonepal is on a distinguished road
Default

We had a client that wanted us to build a script that sends emails, but the only problem it was his hosting didn't allowed him to send more than 100 emails per hours.

So we build him a script in PHP that send only 100 emails per hour. Without the need of a cron to run from cpanel.

-clonepal
__________________
web development - php proxy script
clonepal is offline  
Reply With Quote
Old 05-20-2011, 09:16 PM   #8 (permalink)
The Contributor
 
pipesportugal's Avatar
 
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
pipesportugal is on a distinguished road
Default

Hello clonepal,

Can You be more specific and help Your talkphp colleagues ?

PP
pipesportugal is offline  
Reply With Quote
Old 05-20-2011, 09:24 PM   #9 (permalink)
The Wanderer
 
clonepal's Avatar
 
Join Date: May 2011
Posts: 10
Thanks: 1
clonepal is on a distinguished road
Default

Hello pipesportugal,

Yes, sure.

My client was having his website hosted on a shared server and the terms and conditions from that hosting company where not to send more that 100 emails per hour.

And my tip for talkphp members is that, if you are on a shared hosting, don't use a script that will send thousands of emails or you will get blacklisted or even banned.

-clonepal
__________________
web development - php proxy script
clonepal is offline  
Reply With Quote
Old 05-21-2011, 12:47 PM   #10 (permalink)
The Contributor
 
pipesportugal's Avatar
 
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
pipesportugal is on a distinguished road
Default

Clonepal,

You are not bringing anything new to the table.

I am using cron job to perform the task...

You are not using cron job.
I haven't seen the tip yet.

Regards
PP
pipesportugal is offline  
Reply With Quote
Old 05-21-2011, 11:36 PM   #11 (permalink)
The Wanderer
 
clonepal's Avatar
 
Join Date: May 2011
Posts: 10
Thanks: 1
clonepal is on a distinguished road
Default

People should know that a cron job can get you blacklisted for SPAM. Before using any cron jobs for sending emails, people should ask their hosting and ask them what are the limit of sending emails!
This is the point i wanted to tell about, and advice members.

best regards,
clonepal
__________________
web development - php proxy script
clonepal is offline  
Reply With Quote
Old 05-22-2011, 09:02 AM   #12 (permalink)
The Contributor
 
pipesportugal's Avatar
 
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
pipesportugal is on a distinguished road
Default

ok.

There is still another option for programming people that need the ability of send large number of emails, on their programs.

There are service providers for this task where You can make it through API, for a small monthly amount.

There must be many others, but I am leaving here one:

http://www.emailbrain.com/api/documentation/

No publicity intended.

regards,
PP
pipesportugal is offline  
Reply With Quote
Old 02-18-2012, 08:17 PM   #13 (permalink)
The Wanderer
 
AxelG's Avatar
 
Join Date: Feb 2012
Posts: 16
Thanks: 0
AxelG is on a distinguished road
Default

There is a solution using a javascript on the page sending the emails. If you are allowed to send 200 emails hour do a script sending a request every 18 secondes. It is not difficult with jQuery. The page must stay open in your navigator during the process.
AxelG is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tips: Fastest PHP Code jordie Tips & Tricks 8 05-14-2013 12:47 PM
PHP Perfomance Tips by the Beloved Google Wildhoney Tips & Tricks 28 07-05-2012 01:21 AM
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
Tips: PHP security Village Idiot Tips & Tricks 22 11-23-2007 11:17 PM
Large PHP Site List - Post additions AlEast Absolute Beginners 3 04-13-2005 05:10 PM


All times are GMT. The time now is 02:47 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design