[prev] [index] [next]

Exercise: mail-out

Write a PHP script to send messages to a set of users.

Usage: php email RecipientsFile MessageFile

Format of RecipientsFile

John Shepherd j.a.shepherd@gmail.com
Bill Wilson billw@cse.unsw.edu.au
...

MessageFile may contain template patterns:

[NAME] ... full name of recipient (always two words)
[GIVEN] ... given name of recipient (always one word)
[EMAIL] ... email address of recipient