Best way to read mails in production server

Hello Everyone,

Can you please tell me the best way to read mails in production server. The server windows login is different from the mail accounts from which i have to read. There are three different mail accounts from which I have to read new mails. Please help me in this.


Buddy @Srujitha

while being in server, you can get your mails or even send mails with any of the mail activities that we have in uipath and among them the most reliable is Get Outlook Mail Activity and Get Exchange Mail Activity…
–if you are having the server configured with outlook you can either use Get Outlook Mail Activity or Get Exchange Mail Activity
–or if your server is not configured with outlook you can go for exchange mail activities buddy…

and moreover the exchange mail activity can be used for handling any type of mails like gmail or any other mail providers,

for last consideration you can use smtp mail activity to send mail to any mail like outlook, gmail or other mail providers

Thats all buddy you are done
Kindly try these stuffs and let know whether that works or not buddy
Cheers @Srujitha

Thanks @Palaniyappan.
But will the Get exchange mail activity work when mail has 2-step verification ?

what are that two step verification budy @Srujitha

The first step is to give password, the second step is entering a code which we get to the mobile phone.
I have tried with my mail which has 2-step verification, and getting below error.

Source: Get Exchange Mail Messages

Message: The request failed. The remote server returned an error: (401) Unauthorized.

Exception Type: UiPath.Mail.ExchangeException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Mail.ExchangeException: The request failed. The remote server returned an error: (401) Unauthorized. ----> 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 ExceptionDetail stack trace —
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 831
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\Requests\ServiceRequestBase.cs:line 724
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() in \\REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\Requests\MultiResponseServiceRequest.cs:line 157 at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet) in \\REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\ExchangeService.cs:line 278 at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet) in \\REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core\ExchangeService.cs:line 295 at UiPath.Mail.EmailFolderService.FromWellKnownFolderName(String path, String sharedMailBox, ExchangeService exchangeService) --- End of inner ExceptionDetail stack trace --- at UiPath.Mail.Exchange.Activities.ExchangeActivity1.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)