Exchange server activities

While using exchange server activities i am getting following exception
Invalid URI: The format of the URI could not be determined.

Hi,

This exception generally occurs when the server details passed in workflow is either incomplete or wrong.
It is advisable to use Autodiscover property if this feature is enabled on server side.
I have attached the sample workflow for the better understanding, you can use your MS 365 account for the testing.

Regards
JishnuExchangeMail.xaml (5.1 KB)

5 Likes

Hey @Sanya_Bhasin

Agree with @Jishnu_Kumar

May be you are missing a “scheme” in the uri, e.g., “ftp://” or “http://” the email server host that is to be used.

Regards…!!
Aksh

Hi,
Your example does not explain how to format the “Server” properly in case autodiscover doesn’t work.
Could you describe this.

Thx!

I have the same problem. My Autodiscovery does not work. How can I find out the right server format? I do have the server name, which works on my Outlook, on my iPhone but not on UiPath. Thanks.

Well I am not very sure but a good Server detail will something like this
https://outlook.office365.com/ews/exchange.asmx

the .asmx is the key

2 Likes

i am unable to use ExchangeMail activity,
anyone help me

anyone give me properties of EmailAutoDiscover, ExchangeVerson and Server details.

Hi Jishnu_Kumar,

can you explain some about your post, i am unable to execute your xaml file also,
How to enable Autodiscover on server side,
How to use MS 365 account, i am struck with this.

Regards,
Shaik Jani

I am using settings below to send from exchange:

4 Likes

Thank you. I tried with this solution and it definitely worked.

1 Like

Hi All, I am trying to send email and using “https://outlook.office365.com” in server and my hotmail account as server account. but I am getting following error:
10/10/2019 16:49:32 There is some issue : Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. —> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
** at System.Net.HttpWebRequest.GetResponse()**
** at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse() in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\EwsHttpWebRequest.cs:line 113**
** at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\Requests\ServiceRequestBase.cs:line 821**
** — End of inner exception stack trace —**
** at UiPath.Mail.Exchange.Activities.ExchangeActivity`1.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)**

Could you please help me to understand, what mistake I am doing?

When I used SMTP activity then it worked fine where I have used following setting:

Thank you! https://outlook.office365.com/ews/exchange.asmx worked!

it is related to Exchange version, I changed this versiyon as Exchange_2007 SP1 and it is done