Send email via Gmail SMTP server in PHP
Gmail SMTP
2025-09-01 01:56:21 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP 8926c6da1cb9f-50d8f31c66asm1828668173.44 - gsmtp
2025-09-01 01:56:21 CLIENT -> SERVER: EHLO 1st-choice-formations.co.uk
2025-09-01 01:56:21 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [204.12.204.170]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2025-09-01 01:56:21 CLIENT -> SERVER: STARTTLS
2025-09-01 01:56:21 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
2025-09-01 01:56:21 CLIENT -> SERVER: EHLO 1st-choice-formations.co.uk
2025-09-01 01:56:21 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [204.12.204.170]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2025-09-01 01:56:21 CLIENT -> SERVER: AUTH LOGIN
2025-09-01 01:56:21 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2025-09-01 01:56:21 CLIENT -> SERVER: <credentials hidden>
2025-09-01 01:56:21 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2025-09-01 01:56:21 CLIENT -> SERVER: <credentials hidden>
2025-09-01 01:56:21 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. For more information, go to535 5.7.8 https://support.google.com/mail/?p=BadCredentials 8926c6da1cb9f-50d8f31c66asm1828668173.44 - gsmtp
2025-09-01 01:56:21 SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted. For more information, go to535 5.7.8 https://support.google.com/mail/?p=BadCredentials 8926c6da1cb9f-50d8f31c66asm1828668173.44 - gsmtp
SMTP Error: Could not authenticate.
2025-09-01 01:56:21 CLIENT -> SERVER: QUIT
2025-09-01 01:56:21 SERVER -> CLIENT: 221 2.0.0 closing connection 8926c6da1cb9f-50d8f31c66asm1828668173.44 - gsmtp
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting