Solved

sending newsletters via php & mysqld

Posted on 2011-03-16
4
172 Views
Last Modified: 2012-08-13
Hi,
I have a script for sending newsletters.

my ISP has advised me to set a sleep command of 10seconds every 50 emalis so as to batch them and avoid a few issues.

I'm findng this can lock the browser

One suiggestion
Create a cronjob that runs every 30 mins
It searches a database for newslettter requests
After executing the script to send newsletters,  it deletes the records

In my script, I'd create the record with any variables before returning control to my browser
then wait for the cronjob

Can anyone highllight issues with this approach and/or offer better options
thanks
0
Comment
Question by:joomla
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 35148083
Your basic approach is correct, but I would add these comments

1) If anything goes wrong it sounds like your ISP will not be best pleased. You may breach the Acceptable Use Policy

2) Use ConstantContact or GraphicMail. They will both do this job for you and the statistical analysis tools are good. The emails are very cheap to send. Both companies offer demo accounts for free.

These companies have already solved the email campaign as a problem and they are very, very cost effective. Don't waste your valuable time reinventing the wheel and trying to save a few pennies.
0
 
LVL 14

Accepted Solution

by:
EMB01 earned 250 total points
ID: 35148349
Instead of deleting newsletters after it send them, just add another field called "sent" and update the records once they are sent.  When you send you newsletters, only records that have not yet been sent will be sent.  I created a mass mailer and it worked very well, and it didn't cost me anything but hosting and my time.  I had a pretty good click-through rate, too.
0
 

Author Comment

by:joomla
ID: 35169744
thanks for your feedback EMB01
not sure it's worth 250 points.
Are there any limitations you can think of or spam guidelines I need to consider

Will cronjob set to 30mins be too resource intensive?
htnaks
0
 
LVL 14

Expert Comment

by:EMB01
ID: 37680014
>>  not sure it's worth 250 points.

Thanks, buddy!

>>  Are there any limitations you can think of or spam guidelines I need to consider

Check the SPF and domain keys for your sending IP.

Will cronjob set to 30mins be too resource intensive?

>>  Depends on your server requirements.  The server I sent from didn't have much traffic, so I maxed her out when sending emails.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses four methods for overlaying images in a container on a web page
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now