This tutorial will show how to config phpmailer with gmail
$phpmailer->isSMTP();
$phpmailer->Host = 'smtp.gmail.com';
$phpmailer->Port = '465';
$phpmailer->SMTPSecure = 'ssl';
$phpmailer->SMTPAuth = true;
$phpmailer->Username = '[[email protected]]';
$phpmailer->Password = '[your gmail apps password]';
$phpmailer->From = '[[email protected]]';
$phpmailer->FromName = '[your custom name to send the email]';
how to create & use app passwords
Important: To create an app password, you need 2-Step Verification on your Google Account.
If you use 2-Step-Verification and get a “password incorrect” error when you sign in, you can try to use an app password.
- Go to your Google Account.
- Select Security.
- Under “Signing in to Google,” select 2-Step Verification.
- At the bottom of the page, select App passwords.
- Enter a name that helps you remember where you’ll use the app password.
- Select Generate.
- To enter the app password, follow the instructions on your screen. The app password is the 16-character code that generates on your device.
- Select Done.
more details:
https://support.google.com/accounts/answer/185833
If you want latest update and find more tips and tricks to build your own business platform, please checkout more articles on https://www.productdeploy.com and https://blog.productdeploy.com