Using PHP or Ajax ...Mailing Application

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Using PHP or Ajax ...Mailing Application

Post by kendall »

Hello,

I have a project in which I have to send an email to a list of people in a database. This list can reach as much as 600 a day. I'm using PHP to loop through and send the email using its simple mail().

Now its obvious to me that using a "while" loop to send these emails might cause the application to stall or even crash. Plus I would like to display a status method that states whether or not the email was sent and update the database accordingly.

I have been researching AJAX alot and have implimented quite a few ajax applications.
My questions for advice comes with the options of using AJAX to simulate a sort of "mail queue" that allows me to automatically send emails to the list of people in the contacts 25 emails at time. It sounds a bit drastic to me so it there is a more PHP driven solution i am open to it. I think i have my PHP ini at my disposal so i can make any adjustsments needed be.

But would an AJAX initiated application be a suffice way to simulate a mailing queue system that would allow me to automatically email records periodically (once initiated) to all records in my database?

Kendall
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

I'd use ajax to initiate each batch and display the success / failure output, but I'd use php to keep track of the list position, etc.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Such for the SwiftMailer library. The author is resident here and it's received get acclaim for mass mailing efficiently and the mails sent are less likely to be spam filtered.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

good call olé - I don't know why that didn't occur to me :oops:

btw - what is your avatar? is it a parachute-pack with eyes?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Why not just send out 1 email that's CC'd to all 600 people? It's much less overhead on your part.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

spam filters will kill you if your smtp server doesn't first - we used to send out a newsletter that way...
sike
Forum Commoner
Posts: 84
Joined: Wed Aug 02, 2006 8:33 am

Post by sike »

pickle wrote:Why not just send out 1 email that's CC'd to all 600 people? It's much less overhead on your part.
and you are giving your worthy email adresse to all receivers for free (:
leaving the privacy stuff aside...
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

pickle wrote:Why not just send out 1 email that's CC'd to all 600 people? It's much less overhead on your part.
Was this meant as a joke?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

No, it wasn't meant as a joke. Though I may be out of the loop as to the effects this would have on SPAM. We run our own email server here & we just sent out an email to 1000 students without problems - I figured that would be fine in other applications too.

Ok, ok, so CC isn't that great of an idea. Put a 'B' in front of that to make things all better (at least as far as privacy is concerned).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply