A nice commandline PHP emailer (can be adapted for sites), derived primarily from code at http://php.net.
Worthy of note:
- Use of $HOSTNAME to get the name of the host. This is good for commandline when the $_SERVER variables aren’t available.
- Separate text and HTML source files, normally, text would be derived from HTML with strip_tags.
Risks of HTML emails: http://www.mailchimp.com/resources/top10_html_email_mistakes.phtml
Recommending testing prior to production release
Receipt of emails on all major email clients