530 5.7.0 means the SMTP server will not go further until you secure or authenticate the connection. It is a settings error in your app or device, not a delivery problem: fix the encryption and login settings and it goes away.
530 5.7.0 Must issue a STARTTLS command first.
530 5.7.0 Authentication required.
What it means
Two standards define the two halves. RFC 3207, SMTP over TLS, lets a server answer any command except a few with “530 Must issue a STARTTLS command first” when its policy requires encryption. RFC 4954, SMTP AUTH, defines “530 5.7.0 Authentication required” for servers that need a login before they will accept mail. 5.7.0 is the general security status code from RFC 3463. Gmail sends both lines, followed by a help link.
Why it happens
- TLS is off in your client. “Use SSL/TLS” or “STARTTLS” is unticked, or your code sets
secure: falseand never upgrades. - Wrong port and mode pair. Port 587 needs STARTTLS after connecting; port 465 needs TLS from the first byte. Mixing them up fails.
- No login configured. The SMTP username and password are empty, or “My server requires authentication” is off.
- Old device firmware. Printers and scanners that cannot do modern TLS fall back to plain text and get refused.
- Commands sent before STARTTLS completes. A client that pipelines commands after STARTTLS triggers Gmail’s separate
523 5.7.10 SMTP protocol violation.
How to fix it
-
Pick a submission port and matching mode:
Port Mode Client setting 587 STARTTLS “STARTTLS” or secure: falsewith TLS upgrade465 Implicit TLS “SSL/TLS” or secure: true -
Turn on authentication with the right credentials. For Gmail that means an app password or OAuth; for an email service, usually an API key.
-
In Nodemailer, for example:
nodemailer.createTransport({ host: 'smtp.gmail.com', port: 587, secure: false, // upgrade with STARTTLS requireTLS: true, // refuse to continue without it auth: { user: 'you@gmail.com', pass: process.env.GMAIL_APP_PASSWORD }, }); -
In PHPMailer, set
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;with port 587, and$mail->SMTPAuth = true;. -
For old devices, send through a relay that accepts their TLS version, or update the firmware.
See SMTP requires a secure connection and SMTP ports for more.
Which server sent it
- Gmail and Google Workspace send
530 5.7.0 Must issue a STARTTLS command first.and530 5.7.0 Authentication required., per Google’s list. Gmail also has554 5.7.0 Too many unauthenticated commands. - Microsoft 365 reports a missing login on
smtp.office365.comas5.7.57(client not authenticated to send mail), and says TLS is required to authenticate. Exchange servers may say530 5.7.1 Client was not authenticated. - Yahoo submission servers require TLS and a login, with an app password for third-party apps.
- Postfix and other servers send
530 5.7.0 Must issue a STARTTLS command firstwhensmtpd_tls_security_level = encrypt.
Is it temporary?
No. It is a 5xx reply, and the server will answer the same way every time until your client encrypts and logs in. No message was sent, so there is nothing to retry: change the settings and send again.
How Mailcandor handles it
Mailcandor’s SMTP relay at smtp.mailcandor.com accepts port 465 with TLS or 587 with STARTTLS, with the username mailcandor and an API key as the password. The HTTPS API avoids SMTP settings entirely. Once mail flows, the deliverability coach explains any bounce in plain English and hard bounces are suppressed automatically. Decode any reply with the free bounce code lookup, browse the error library, set up your domain with our SPF, DKIM and DMARC guide, and see more free tools.