Errors

530 5.7.0: must issue a STARTTLS command first, or authentication required

Short answer

530 5.7.0 means the SMTP server refused your command because you have not secured or authenticated the connection. RFC 3207 defines 530 Must issue a STARTTLS command first, and RFC 4954 defines 530 5.7.0 Authentication required. Gmail sends both. Fix it by connecting on port 587 with STARTTLS or 465 with implicit TLS, then logging in with SMTP AUTH before you send. Retrying without changing settings will not work.

Last checked 16 November 2026

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: false and 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

  1. Pick a submission port and matching mode:

    Port Mode Client setting
    587 STARTTLS “STARTTLS” or secure: false with TLS upgrade
    465 Implicit TLS “SSL/TLS” or secure: true
  2. Turn on authentication with the right credentials. For Gmail that means an app password or OAuth; for an email service, usually an API key.

  3. 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 },
    });
  4. In PHPMailer, set $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; with port 587, and $mail->SMTPAuth = true;.

  5. 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. and 530 5.7.0 Authentication required., per Google’s list. Gmail also has 554 5.7.0 Too many unauthenticated commands.
  • Microsoft 365 reports a missing login on smtp.office365.com as 5.7.57 (client not authenticated to send mail), and says TLS is required to authenticate. Exchange servers may say 530 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 first when smtpd_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.

Questions

What does '530 5.7.0 Must issue a STARTTLS command first' mean?

The server requires an encrypted connection before anything else. Your client sent a command in plain text. Turn on STARTTLS (or use port 465 with SSL/TLS).

What does '530 5.7.0 Authentication required' mean?

You tried to send without logging in. Turn on SMTP authentication with your username and password or API key.

Which port should I use to avoid 530 5.7.0?

Port 587 with STARTTLS, or port 465 with implicit TLS. Port 25 is for server-to-server delivery and often blocked by hosting and cloud providers.

Is 530 5.7.0 a bounce?

No. It happens during the SMTP conversation, so your app gets an error and no message is sent. Nothing reaches the recipient.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.