535 5.7.8 Username and Password not accepted
The SMTP login was rejected
Seen in Gmail SMTP (smtp.gmail.com), Postfix/Dovecot, apps and scripts
The mail server refused the username and password your app used to log in for sending.
Common causes
- Using the normal Google account password; Gmail SMTP needs an app password or OAuth.
- An app password that was revoked, or reset when the account password changed.
- A wrong username: it must be the full email address.
How to fix it
- Turn on 2-Step Verification and create an app password, or switch the app to OAuth 2.0 (XOAUTH2).
- For Google Workspace, check the admin has not disabled app passwords or SMTP access.
- Use smtp.gmail.com on port 587 with STARTTLS or port 465 with implicit TLS.
Got a different message? Paste it into the error explainer.
Related errors
- 550 5.4.1 Recipient address rejected: Access denied · Microsoft 365 rejected an unknown recipient at the edge
- 550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP · Microsoft 365 blocked the tenant's outbound mail
- 530 5.7.57 Client not authenticated to send anonymous mail during MAIL FROM · The app sent to smtp.office365.com without logging in
- 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant · Microsoft 365 refused the SMTP AUTH login
- 550 5.7.520 Access denied, Your organization does not allow external forwarding · Automatic forwarding to an outside address is blocked
- 550 5.1.8 Access denied, bad outbound sender · The sending account was blocked for spam
- 451 4.7.500 Access denied, please try again later · Microsoft 365 is temporarily throttling the sending IP
- 552 5.2.2 The recipient's inbox is out of storage space · The recipient's mailbox is full
- 552 5.3.4 Your message exceeded Google's message size limits · The message is larger than the server accepts
- 450 4.2.0 <user@example.com>: Recipient address rejected: Greylisted · The message was greylisted; it will be accepted on retry
- 553 5.7.1 <user@example.com>: Sender address rejected: not owned by user · You logged in as one user but sent as another address
- 530 5.7.0 Must issue a STARTTLS command first · The server requires TLS before it accepts mail