Laravel: Expected response code 250 but got 550 Email / SMTP Origin: Network Last updated 4 Nov 2026

Laravel: Expected response code "250" but got code "550", with message "550 5.7.1 Relaying denied"

Laravel connected and authenticated but the SMTP server rejected the message at the RCPT TO / MAIL FROM / DATA step with the code shown.

Exact message you may see Expected response code 250 but got code 550Expected response code "250" but got code "550"Expected response code 354 but got code "554"Expected response code 250 but got code 535Swift_TransportException: Expected response code 250
Seen on: SMTP Laravel PHP

Meaning

The code and message after "but got" are the real error — it is the server's reply. 550 5.7.1 means relay denied or policy, 553 sender not allowed, 554 content or IP blocked, 535 bad login. Read the number, then use that error's page.

Common causes

  • Sender address (MAIL_FROM_ADDRESS) not allowed for the account
  • Relaying not permitted without authentication
  • Recipient invalid (550 5.1.1)
  • Domain/IP blocklisted or lacking SPF/DKIM
  • Content flagged as spam

⚡ Quick fix

  1. Read the code in the message and fix that specific problem
  2. Set MAIL_FROM_ADDRESS to a verified sender
  3. Add SPF/DKIM and confirm the SMTP credentials

Detailed fix by platform

Laravel

  1. Log failures: Mail::send(...) inside try/catch and report($e); set MAIL_MAILER=log to inspect the generated message

How to diagnose

  1. Code — What number follows "but got"?
  2. From — Verified sender?
  3. Recipient — Valid address?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

419 Page Expired — Laravel: 419 Page Expired (CSRF token mismatch) (PHP)419 Page Expired421 4.7.0 Try again later (rate limited) — SMTP: 421 4.7.0 Our system has detected an unusual rate of unsolicited mail originating from your IP address. Mail sent from your IP address has been temporarily rate limited (Email / SMTP)421 4.7.0 Try again l…450 4.7.1 Greylisted, please try again later — SMTP: 450 4.7.1 <user@example.com>: Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/example.com.html (Email / SMTP)450 4.7.1 Greylisted,…451 4.3.0 Local error in processing — SMTP: 451 4.3.0 Error: queue file write error / 451 Requested action aborted: local error in processing (Email / SMTP)451 4.3.0 Local error…550 5.1.1 — 550 5.1.1 The email account that you tried to reach does not exist (User unknown) (Email / SMTP)550 5.1.1550 5.7.1 — 550 5.7.1 Relaying denied / Message rejected as spam / Unauthenticated email not accepted (Email / SMTP)550 5.7.1553 5.7.1 Sender address rejected: not owned by user — SMTP: 553 5.7.1 <noreply@example.com>: Sender address rejected: not owned by user user@example.com (Email / SMTP)553 5.7.1 Sender addr…Attempt to read property "x" on null — Laravel/PHP 8: ErrorException: Attempt to read property "name" on null (Laravel)Attempt to read prope…Laravel: …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.