Send Exchange Mail Message Issue: The Underlying Connection Was Closed - An Unexpected Error Occurred On Send

What needs to be checked whenever "Send Exchange Mail Message" activity throws an error: "Exception message: The request failed. The underlying connection was closed: An unexpected error occurred on a send"?

Check if this is happening

  • with many file types or
  • when trying to attach small files (1-2 kb).

Usually this error occurs because the Exchange Server has some limitations set for file size, file type etc.

Check with the local IT team, whether there are any blockings/ limitations set up on the server and remove them.

Read more on UiPath Forum post - Send Exchange Mail .