Send emails from XAMPP to Gmail

A guide to sending emails to your Gmail account for local development using XAMPP.
Download Send Mail ZIP
Go to xampp/sendmail and delete everything in there, copy the contents of the ZIP into there.

Open sendmail.ini and edit the appropriate lines to this.

Open php.ini and edit the appropriate fields to this.
[mail function]
smtp_port = 587
sendmail_from =
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

Check in the folder xampp/php/ext you have the file php_openssl.dll else download it from here.

Now back to your php.ini file under the section Windows Extensions, ensure these lines are not commented out or add them.

In your new Gmail Account go to My Account and Turn On 'Allow less secure Apps'

Restart Apache and you should be ready to go.