Shiju Devaraj
Shiju Devaraj

Reputation: 1

How to solve the error "The server response was: 5.1.3 Invalid address"

I have the below error happening in our DOT NET application. We trying to send a group of email in BCC from a DOT NET application.

When we have more than 25 emails in bcc and if the application sent a request to Outlook SMTP it failed with an error:

syntax error in parameters or arguments. The server response was: 5.1.3 Invalid address

Upvotes: 0

Views: 13858

Answers (1)

Brad
Brad

Reputation: 3591

From comments saying this should be answer so posting as answer:

This happens because you can only have so many characters in the string for the TO or BCC fields. If the string of all the emails is too long it cuts part of the last few characters off (that go over the character limit) so you have a partial email address, and that is what is causing your error. My suggestion would be to create a distro group for all of these emails then you only have to send it to 1 address.

Example Email string "[email protected];[email protected]"

For this example the string max length for emails is 25 so you would only have this in your BCC field which cuts them off: "[email protected];test123"

The last part is cut off because it is greater than the 25 characters (for this example). Since test123 is not valid email, that is where your error is coming from.

Upvotes: 1

Related Questions