Send SMTP Mail Message: Cannot access a closed Stream. Error while forwarding email

Hello all,
I have a process which retrieves outlook emails from remote server using Get IMAP Mail Messages activity and then forwards those email to other address using Send SMTP Mail Message.
For each email that retrieved from server, I configured so that it would be forwarded as following Screenshot_3

The fetching emails step is fine, but I got this error in the forwarding step:
RemoteException wrapping System.ObjectDisposedException: Cannot access a closed Stream.
at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Please support me on this one. Thank you!


Welcome to uipath forum

If it’s a outlook account and if it’s configured in your machine where the bot is running then we can use GET OUTLOOK MAIL ACTIVITY and SEND OUTLOOK MAIL ACTIVITY

which is way more easier to use

Did we try with that

And even if the outlook application is not configured in your machine then you can try with GET EXCHANGE MAIL activity and SEND EXCHANGE MAIL activity where we need to pass the outlook credentials alone

For details on what properties to mention in exchange activity
Here you go

Cheers @Anh_Duong_Trung

Have you solved the issue?