Phpmailer подключить GSuite
Нужно phpmailer подключить GSuite
$mail->SMTPDebug = 1;
$mail->isSMTP();
$mail->Host = 'ssl://smtp.gmail.com';
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'pass';
//$mail->SMTPSecure = 'tls';
перепробовал много настроек, выдает ошибку
2021-01-24 09:09:40 CLIENT -> SERVER: EHLO ldm-service.site
2021-01-24 09:09:40 CLIENT -> SERVER: AUTH LOGIN
2021-01-24 09:09:40 CLIENT -> SERVER: Y29tcGxpYW5jZUBybmMtbWFpbC5ydQ==
2021-01-24 09:09:41 CLIENT -> SERVER: IVJuYzIxMjA=
2021-01-24 09:09:41 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 v9sm1038378lfp.195 - gsmtp
SMTP Error: Could not authenticate.
2021-01-24 09:09:41 CLIENT -> SERVER: QUIT
SMTP Error: Could not authenticate.
Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.