PHPMailer using Gmail`s SMTP Simple code to create a PHPMailer instance to send e-mails using Gmail`s SMTP based on this example . Configure your Gmail account and APP password in the file example/send.php.