5 Replies - 578 Views - Last Post: 05 October 2012 - 09:21 AM Rate Topic: -----

#1 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 5937
  • View blog
  • Posts: 10,346
  • Joined: 28-September 07

Daily Auto Email - Where to Start?

Posted 05 October 2012 - 06:21 AM

A few years back, I created an Information Literacy Training Module for the students at my workplace. It runs through a series of three tutorials. After each tutorial, the student must complete a quiz. Their quiz results are then sent to their instructor (the student enters this email) and to the lab proctor (the system auto-sends this email).

A policy change at the start of the new semester now mandates that ALL students must complete the ILT Module. So, instructors end up with ~30 emails each (one for each student in the class), but the proctor gets upwards of 300 emails every day containing individual student scores.

These scores are also stored in a MySQL database for reporting and system adjustment purposes.

Earlier this week, I received a request from the proctor to set up her mailings to send her one daily batch mail versus an individual mail for each student. I would have no trouble doing this as a triggered event (ie, create an admin panel feature to send the daily batch with the click of a button), but I'd like to set it up to be a hands-off, fully-automated, daily occurrence... so if I'm not on campus one day or the proctor's not on campus one day, or students are taking their quizzes over the weekend, she still gets her daily email.

How would I get started setting this up using PHP and MySQL on an IIS server?

Is This A Good Question/Topic? 0
  • +

Replies To: Daily Auto Email - Where to Start?

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,441
  • Joined: 23-August 08

Re: Daily Auto Email - Where to Start?

Posted 05 October 2012 - 06:39 AM

*
POPULAR

Well IIS means you'll be using a scheduled task, as opposed to a cronjob. And make sure the PHP install contains a commandline version of PHP.

1. Write PHP script to retrieve data from MySQL and email to students.
2. Add call to script to scheduled tasks on the server where PHP/MySQL is installed.
3. Wipe hands on pants.
Was This Post Helpful? 5
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: Daily Auto Email - Where to Start?

Posted 05 October 2012 - 08:18 AM

Another, less reliable method - which I was forced to use once when a scheduled task was not an option - is to have PHP trigger the batch itself once per day. Each time a student submits a score, have PHP check to see if certain conditions are true, and if they are then send the batch. In my case I just checked if it had been more than 12 hours since the last batch was sent, but that's totally up to you.

Obvious downside is that if the students all of a sudden stop submitting scores for a few days, some emails could be stuck waiting for a batch to be triggered.
Was This Post Helpful? 0
  • +
  • -

#4 Jstall  Icon User is offline

  • Lurker
  • member icon

Reputation: 434
  • View blog
  • Posts: 1,042
  • Joined: 08-March 09

Re: Daily Auto Email - Where to Start?

Posted 05 October 2012 - 08:47 AM

Be aware that the command line version of PHP can have a different configuration than the web version. If you start to see discrepancies in command line vs web invoked behavior that is where I would start looking.
Was This Post Helpful? 1
  • +
  • -

#5 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2896
  • View blog
  • Posts: 10,035
  • Joined: 08-August 08

Re: Daily Auto Email - Where to Start?

Posted 05 October 2012 - 09:14 AM

I'm wondering why you can't give the instructors/proctors a page they can log into where they can see these scores anytime they like. Why send any emails?
Was This Post Helpful? 1
  • +
  • -

#6 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 5937
  • View blog
  • Posts: 10,346
  • Joined: 28-September 07

Re: Daily Auto Email - Where to Start?

Posted 05 October 2012 - 09:21 AM

That would be fantastic if we could get everyone to agree to it. I have a hard enough time getting them to use an intranet-based time-off request form. We have a few paranoid tin foil hat conspiracy theorists in our midst.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1