Send Mail through GMail SMTP Server with PHP

The HTML Mail app lets you send rich text emails to anyone without requiring an account. Internally, it uses the mail() function of PHP to deliver these messages.

The PHP Mailer library on Github is a wrapper over the built-in mail function but adds support for attachments and also integrates with SMTP so you can send mail without having a local mail server. This script lets you send messages via your Google’s Gmail server.