Provider setup

SendGrid SMTP test — apikey user and port 587

Test SendGrid SMTP at smtp.sendgrid.net:587. Use username apikey and your API key as the password.

4 min read Credentials redacted No signup

Connection settings

Host
smtp.sendgrid.net
Port
587
Security
STARTTLS

SendGrid's SMTP relay is at smtp.sendgrid.net on port 587 with STARTTLS (or port 465 with implicit TLS, or port 2525 as an alternative when 587 is blocked). Unlike most providers, the SMTP username is the literal string apikey — not your email address — and the password is a SendGrid API key that has the "Mail Send" permission enabled.

Recommended settings

Creating an API key for SMTP

  1. Log in to the SendGrid dashboard.
  2. Go to Settings → API Keys → Create API Key.
  3. Name the key (e.g. "SMTP Tester") and select "Restricted Access".
  4. Under Mail Send, enable "Mail Send" (the only permission SMTP needs).
  5. Click Create & View. Copy the key immediately — SendGrid only shows it once.
  6. Use this key as the SMTP password. The username is always apikey.

Do not use your SendGrid account password or your Twilio master account password — those will not authenticate over SMTP.

Testing with SMTP Tester

  1. Set host to smtp.sendgrid.net, port 587, security STARTTLS.
  2. Username: apikey. Password: paste your API key.
  3. From: an address on a domain you have verified in SendGrid (Sender Authentication).
  4. To: any recipient (or your own address to verify delivery).
  5. Click Run. A successful test shows 235 Authentication successful followed by 250 Ok with a message ID after DATA.

Common errors

535 "Authentication failed" / "basic authentication is not allowed"

The most frequent SendGrid SMTP error. Causes:

550 "The from address does not match a verified Sender Identity"

Authentication worked, but SendGrid rejected the message because the From address is not authorized. Fix: go to Settings → Sender Authentication and either verify the exact email address as a Single Sender, or authenticate the full domain via DNS (CNAME records).

451 "Temporarily unavailable, please try again"

SendGrid is throttling or rate-limiting the connection. Causes include exceeding your plan's hourly/daily sending rate, or the account being flagged for review. Check your SendGrid dashboard for alerts.

Connection timeout on port 587

Some networks and cloud providers block outbound port 587. SendGrid also accepts SMTP on port 2525 (STARTTLS) and port 465 (implicit TLS). Switch to one of those if 587 times out.

Sender Authentication (required)

SendGrid requires that the "From" address is authorized before it relays mail. Two options:

Without either, SendGrid responds with a 550 after AUTH even though the credentials are valid.

SendGrid sending limits

Limits vary by plan:

Exceeding limits results in 451 temporary rejections or queued mail. Check the Activity Feed in the SendGrid dashboard to track delivery status.

API key vs SMTP credentials

SendGrid does not issue separate "SMTP credentials" like some providers. The same API key used for the REST API (v3 Mail Send) also works for SMTP — just use apikey as the username. If you see references to "SMTP credentials" in legacy docs or forum posts, they are referring to the old username/password system that has been deprecated. Always use an API key.

Security notes

Try it on your own server

Run these settings against your SMTP server and watch the live, credential-redacted protocol transcript.

Open SMTP Tester