chrisstump
3/23/18 at 11:15 am
PHP
phpmailer
PHPMailer Gmail Config
Configure PHPMailer to send emails from a Gmail account.
$mail = new PHPMailer; $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->Port = 465; $mail->SMTPSecure = 'ssl'; $mail->SMTPAuth = true; $mail->username = 'myemail@gmail.com'; $mail->password = '********';
Copy Snippet to Clipboard
Don't Have an Account?
Stop digging through old code examples. Get organized. Get Code Snipper.
Learn More
Start Free 14 Day Trial