1Before sending emails using the Gmails SMTP Server, you to make some of the
2 security and permission level settings under your Google Account Security
3 Settings.
4
51. Make sure that 2-Step-Verification is disabled.
6
72. Turn ON the "Less Secure App" access or click here.
8
93. If 2-step-verification is enabled, then you will have to create app
10 password for your application or device.
11
124. For security measures, Google may require you to complete this additional
13 step while signing-in. Click here to allow access to your Google account
14 using the new device/app.
15
16Note*: It may take an hour or more to reflect any security changes
17===================================================================
18PHP CODE CONFIG :=
19
20$mail->SMTPDebug = 1;
21$mail->SMTPAuth = TRUE;
22$mail->SMTPSecure = "tls";
23$mail->Port = 587;
24$mail->Host = "smtp.gmail.com";
25$mail->Username = "your-email@gmail.com";
26$mail->Password = "your-gmail-password";
27
28=================================================================
29
30For More Info check this link : https://pepipost.com/tutorials/send-an-email-via-gmail-smtp-server-using-php/
31