We have a PHP shopping cart application on our website called X-Cart. One of its features is for customers to sign up to a newsletter, which we send out quarterly. They are sent out by a php script which runs by pressing a button in the X-Cart admin panel (browser based PHP page), and we have been having some problems with this.
The browser seems to time out before all the emails are sent. We have 4500 people signed up to the email, and X-Cart has no way of logging which emails were sent.
We've got someone who will be looking into this problem for us but in the meantime we need a short term solution for sending out our latest newsletter. The newsletter subscribers table (mysql) consists of three rows:
'id' - an auto incrementing integer field
'email'
'since_date' - a unix timestamp for when they subscribed.
I'm considering setting up another table which will have rows:
'id' - relates to subscriber id above
'newsletter_id' - the newsletter edition number.
I could then set up a php script with a for loop and a mysql query to run as a cron job. It could get the subscribers from the newsletter subscribers table (perhaps 50 addresses each time it runs) and then send out the email newsletter using the PHP Mailer class. After a successfully sent email the newsletter edition number would be added to that subscriber’s id in the second table.
Does this sound feasible as a short term stop gap while we look for a solution? Are there any unforeseen gotchas that I'm missing by sending out 4500 emails this way? If how many emails I send and how often is an issue, how many emails do you think I should send out on each run of the cron job, and how often do you think it should run?
TIA,
Chris.
The browser seems to time out before all the emails are sent. We have 4500 people signed up to the email, and X-Cart has no way of logging which emails were sent.
We've got someone who will be looking into this problem for us but in the meantime we need a short term solution for sending out our latest newsletter. The newsletter subscribers table (mysql) consists of three rows:
'id' - an auto incrementing integer field
'email'
'since_date' - a unix timestamp for when they subscribed.
I'm considering setting up another table which will have rows:
'id' - relates to subscriber id above
'newsletter_id' - the newsletter edition number.
I could then set up a php script with a for loop and a mysql query to run as a cron job. It could get the subscribers from the newsletter subscribers table (perhaps 50 addresses each time it runs) and then send out the email newsletter using the PHP Mailer class. After a successfully sent email the newsletter edition number would be added to that subscriber’s id in the second table.
Does this sound feasible as a short term stop gap while we look for a solution? Are there any unforeseen gotchas that I'm missing by sending out 4500 emails this way? If how many emails I send and how often is an issue, how many emails do you think I should send out on each run of the cron job, and how often do you think it should run?
TIA,
Chris.