Outlook send mail from shared mailbox reprise

I’ve seen a number of threads that touch on this, but nothing that coherently answers the question of how to resolve the problem.

I am very happily getting and sending mail under my own identity/account, leaving the ‘Account’ property of both Send and Get blank.

We have a shared mailbox, ‘Expenses’. Our IT guys set it up a few days ago, and it appeared spontaneously in the left panel of my Outlook. In Outlook I am able to see the contents of the Inbox, and am able to send from the box by simply substituting the box address, expenses@ourcompany.com, for my own in the From field of the outgoing message. Any message sent from this address in this way appears in the shared box’s Sent folder. Cool.

Back to UiPath, I put a ‘Get Outlook Mail Messages’ activity in my workflow. I specify Input->Account == “Expenses” and Input->MailFolder == “inbox”, and woo hoo! I am rewarded with the contents of the Expenses mailbox inbox.

I add a “Send Outlook Mail Message”. I address the message to my own email (dkurtz@ourcompany.com) and, based on what works in ‘Get…’ I specify Input->Account == “Expenses”.

For my troubles I am rewarded with an error:
Main has thrown an exception

 Source: Send Outlook Mail Message
 Message: Account not found: Expenses
 Exception Type: ArgumentException
 System.ArgumentException: Account not found: Expenses
    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)

I have tried variations on the mailbox name: “Expenses”, “expenses”; specify the mailbox’s address “expenses@ourcompany.com”, with and without the domain “ourcompany\Expenses”, nothing. Zip, nada. Same error each time.

I’ve also tried “Send Exchange Mail Message” and haven’t gotten that to work at all. Throws a “Source: Newtonsoft.json; Exception Type: JsonSerializationException” every time.

So, back to the Outlook activities. Recap: I can get mail from the shared box by specifying the name of the box in the “Account” property. I can’t send mail from the box by specifying the name of the box in the “Account” property.

How do we get around this?


1 Like


Unfortunately I can not help solving this issue but I want to push this thread because I face the same problem!


Wow, it’s been so long since I last looked at this that I don’t remember exactly where we were when last I did. I think we may have resolved the issue by replacing the shared mailbox with an account, with it’s own ID and credentials. I should be able to look back at this next week, will update.


Same situation for me. Is there a solution for this issue?

We’re also facing the problem. is there any new idea so far?

@Bottoncino @pzampella @Neerk
Check out this post as it helped me.

You need to enable the shared mail box id and register it as your secondary user.
After that you just need to use the name of the mailbox in the Account field of the Send Outlook Mail Messages.


@rabbit_rebozo, can you tell me what your solution was in the end? I’m facing the exact same issue and am unable to use the solution suggested by @kunalj as it is a mailbox and not an account and so it does not appear in my list of accounts for me t be able to set as default.

Additionally, I want to be able to save the mail as a draft in the drafts folder of the shared mailbox. Currently when I select the ‘IsDraft’ parameter within UiPath the email is saved to my personal account drafts folder rather than the shared account drafts folder.

I’m looking to revive this thread as it’s something I need a solution to and as yet, I haven’t been able to resolve it.

@ClaytonM, I’m hoping this might be something you’ve encountered?

Hi @Foehl

I am not sure if relevant, but you could try going over this post:

That looks to be exactly the same issue. We also have our mailbox in Exchange 365 online but a local SMTP server. It looks like from what Rasmus_j was saying that this is something that requires a fix within the UiPath activity. Do you know if this is on the radar for bug-fixes / improvements?

Hi Guys,

You can definitely try this:

Let me know if you need any help with setting this up.


I had the same issue in one of the process I was automating. When you are given access to the share folder it will immediately appear in the Outlook window, but in order to be able to send mails you need that account added as one of the account in your Outlook accounts window. Then set that account as Primary / Default. Now restart the Outlook and try saving the mail. It will save the mail in the share folders drat. @Foehl, try this and let me know if it works for you too.