Xampp and Gmail SMTP

Here is a PHP mail library that works with Gmail SMTP and Xampp:

https://github.com/PHPMailer/PHPMailer

Download all code as a zip and unzip somewhre in htdocs.

https://github.com/PHPMailer/PHPMailer/archive/master.zip

In the unzipped folder go to

../examples/

find the file gmail.phps and copy the file
paste it and rename to gmail.php

Edit the file and add your user details. For the sake of the test let the recipient be yourself.
If you fire off the file and get a mail then it works.

And it worked for me in Xampp.

Published by Per Thykjaer Jensen

Senior Lecturer at the Multimedia Design and Communication Programme at Aarhus Business College. I teach code and UX. Linux evangelist and WordPress expert.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.