Page 1 of 1

Using PHP or Ajax ...Mailing Application

Posted: Mon Jan 29, 2007 7:15 pm
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

Posted: Mon Jan 29, 2007 7:30 pm
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.

Posted: Mon Jan 29, 2007 7:32 pm
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.

Posted: Mon Jan 29, 2007 7:33 pm
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?

Posted: Tue Jan 30, 2007 3:46 pm
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.

Posted: Tue Jan 30, 2007 4:00 pm
by Kieran Huggins
spam filters will kill you if your smtp server doesn't first - we used to send out a newsletter that way...

Posted: Wed Jan 31, 2007 6:00 am
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...

Posted: Wed Jan 31, 2007 7:06 am
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?

Posted: Wed Jan 31, 2007 10:06 am
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).