cancel
Showing results for 
Search instead for 
Did you mean: 

Email - Exchange Managed API - Unable to connect to the remote server

Ashis_KumarRay
Level 4
​​Hi All,

We are using Email - Exchange Managed API object rather than MAPIEx or MS Outlook VBO to send email from BP to outside. From last 2-3 weeks we are getting an error from some processes while reading emails from Inbox i.e. "ERROR: Internal : Could not execute code stage because exception thrown by code stage: The request failed. Unable to connect to the remote server". This issue has occurred for 1 Bot out of 10 Bots. Then Controller restarted that Bot and again it started working fine. I wanted to know why this error has come for that particular Bot and in which scenario and what precaution we should take to restrict this kind of error. When a process terminates for this issue, no alert email are also coming to controller team as sending an email is totally depending upon this object.

While using the above object we configure exchange server by passing Email id and password. And then started reading email from Inbox. The above error is coming while reading email from Inbox. This is happening very rarely not so often.

Thanks


------------------------------
Ashis Kumar Ray
RPA Developer
Europe/London
------------------------------
3 REPLIES 3

PhilipTrovato
Level 4
I started seeing the same about 2 months ago. Ocurs rarely and on a bot that checks for new emails regularly (every 2 minutes). I suspect the error is as stated and is an error on the 0365 server side (or some other connectivity issue). It's on the to do to still to troubleshoot, but my approach below.

1)Set up a few more test machines to read emails every 2 minutes. Wondering if I can duplicate, or  t's something related to just this one mailbox.

2)Set up a recover stage and retry 3 times with a 60-second pause. Should Bandaid it.  

3)Try to not depend on email alerts for email issues. Maybe send an IM, or alert off of session logs (either query the DB  ship logs Splunk).

------------------------------
Philip Trovato
------------------------------

DaveMorris
Level 14
When you say the Controller restarted that Bot, are you saying they restarted the machine or simply restarted the Process?

Have you considered using SMTP as a backup to your primary method of sending emails? Our primary means of sending emails is an internal tool/service that obviously wouldn't be available to the public, but our backup if that fails is to use SMTP. Unless your organization has disabled it, you should be able to use SMTP and that basically never fails. There are security concerns I suppose with SMTP such as it not saving Sent Emails anywhere and it's possible to spoof who the Sender is. But there are solutions to both of these issues that I can describe later if for some reason you decide to implement it.

You'd have an object with an action like 'Send Email' which would first call 'Email - Exchange Managed API'. If that throws an exception, then it immediately tries to send an email using the backup method (which as I mentioned could be SMTP). Alternatively, you could consider using the MS Outlook Email VBO as your backup. I'm guessing you also don't use it for the same reason that I don't: emails getting stuck in the Outbox. (and @PhilipTrovato knows that issue well too haha...I'm shaking my head at emails getting stuck in the Outbox)​​. But you might want to consider reintroducing the use of the Outlook VBO simply as a secondary/backup means of sending emails. It's not a perfect solution but it's still a good long term backup and it gets you a safety net while you figure out what is causing the 'The request failed. Unable to connect to the remote server' issue.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

We have been experiencing the exact same issue with Exchange Server object over the last 12 months and the situation has only got worse. There are days where we constantly get the operation timeout error. The request failed. Unable to connect to the remote server'. Has anyone come up with a stable solution for this as we have not been able to stabalise this. We have built in VBO back up which works for most functions, although not for all consistently such as search mailbox or download attachments.

------------------------------
Sarah Knowles
Intelligent Automation Officer
The City of Edinburgh Council
Europe/London
------------------------------