emailsendgridsendgrid-api-v3

553 5.1.3 The recipient address is not a valid RFC-5321 address


When sending bulk emails I was receiving several error messages that said:

553 5.1.3 The recipient address <john@example.com > is not a valid RFC-5321 address.

The format of the email addresses looked completely valid so I couldn't figure out at first why these messages weren't being delivered.


Solution

  • Upon further inspection, I noticed that the recipient email addresses for each of the failed messages had a single space on the end. It's not as hard to see in the example I provided above, but the error report I was viewing had smaller font and would sometimes put a line break where the space was, so it wasn't as obvious. By the way, I was using the SendGrid API to send these emails, but I don't think that the issue would be unique to using SendGrid.