Emails sent via the Nylas API go into spam or return a bounced message

Emails sent via the Nylas /send endpoint are flagged as spam / bounced, yet emails sent via the providers' mail client are received successfully.


Follow the steps below to determine the cause and the next steps. The bounce message (554 5.7.1 / 5.1.8) will typically tell you if it's a block due to:

  • Modifying headers - SPAM
  • Email Account flagged as SPAM
  • Message rejected due to local policy (could be anything including - Domain reputation)

You may get these response from the recipient OR the sending SMTP server.



1. Confirm that this behaviour happens ONLY when sending via Nylas

  • Have the customer send the same email to the recipient via the providers webmail client
  • If the email is blocked when sent via the provider then the issue is with either:
    • The providers SMTP IP address
    • The senders domain reputation
  • If this is an IMAP / generic account this is the problem 90% of the time.
  • Solution: to either of the above is to have the customer contact their mail administrator.


2. Is you application modifying the headers, i.e. are you sending as RAW vs MIME? Providers do not trust modified headers.

curl -X POST '' \
-H 'Content-Type: message/rfc822' \ <<<< RAW MIME
  • Try sending it via NYLAS as MIME.
curl --request POST \
  --url \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  • Solution: Don't modify your headers, modify the body instead. The Nylas default is to send as MIME.


3. Microsoft and Google have a separate SMTP server for applications

An email sent via the Providers mail client will be sent via a different SMTP server than that used by third-party applications such as Nylas. 

They have a pool of outbound SMTP servers which applications such as Nylas get directed to via DNS round robin.

The client's domain shares these servers with other organisations, as such the reputation on these servers IP addresses can be tarnished by third parties using those same servers.

As the developer / support team of the application:

  • Open the sent email in a text editor and check the header it should have a list of hostnames / IP addresses used in the path to send the email.
  • Lookup those IP's with to see if they are blacklisted
  • Solution: Reach out to the domains mail administrator, they will need to ask their Provider to change their outbound SMTP server. This is quite a common issue.

4.  The account is sending spam

5. Try sending the email without link tracking enabled.

5 . Checked all the above and it all comes back clean

  • Get the RAW message to find the FULL headers which have the spam report and pass the headers into ChatGPT to determine why the bounced message identified as SPAM
  • Test the IP's and domains in the headers against blacklist checkers 
  • Find the Header Message-ID as per our docs
  • If this is happening for ALL messages for a specific provider then reach out to support.


User received a 5.1.8 response. I am an email admin, How do I fix this?

Feature request - White Label Tracking URL's

Apple icloud SPAM policy

Dealing with SPAM
Google: Email bounces due to blocked IP address


Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.