Assignments 4 (Wednesday, October 26):

Write a web-based email application where the user enters the following data in a browser -

- Email Address
- Subject
- Body Text

A PHP program should receive the data and check its validity. If the data is valid, the program should send the email to the specified email address and output a 'thank you' message to the user. If the data is invalid, the program should provide an error message, stating that the data is invalid, and should provide the input form once again.

Implement the following Validity checks -

(1) Email Address: check that there are no spaces in the string. Also check that the character '@' occurs in the string, and that the character '.' occurs after the '@' character.

(2) Subject: make sure the Subject header does not contain all upper case characters (many spam filters check for this).

Finally, the 'From' email header should be 'admin@username.com' where username is your Dal CS username.

Send URL and code to standage@cs.dal.ca with the subject line ECMM6010A4.