how i can use my email like [email protected] in phpmailer. because i always have an error even i have a correct credentials.
2020-05-14 09:21:24 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP e13sm1851788pfh.19 - gsmtp
2020-05-14 09:21:24 CLIENT -> SERVER: EHLO localhost
2020-05-14 09:21:24 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [114.108.210.106]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2020-05-14 09:21:25 CLIENT -> SERVER: AUTH LOGIN
2020-05-14 09:21:25 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2020-05-14 09:21:25 CLIENT -> SERVER: [credentials hidden]
2020-05-14 09:21:25 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2020-05-14 09:21:25 CLIENT -> SERVER: [credentials hidden]
2020-05-14 09:21:25 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials e13sm1851788pfh.19 - gsmtp
2020-05-14 09:21:25 SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials e13sm1851788pfh.19 - gsmtp
SMTP Error: Could not authenticate.
2020-05-14 09:21:25 CLIENT -> SERVER: QUIT
2020-05-14 09:21:25 SERVER -> CLIENT: 221 2.0.0 closing connection e13sm1851788pfh.19 - gsmtp
SMTP Error: Could not authenticate.
this is my configuration:
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->SMTPAutoTLS = true;
$mail->Username = '[email protected]';
$mail->Password = '';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;