I’m working on a small project, and I have an Outlook send e-mail activity. It seems that, between, yesterday and today, it stopped working. I now get the following error:
“Object reference not set to an instance of an object”.
I haven’t changed that activity since it last time worked.
Do you know what I could look at, in order to figure out what’s wrong?
Everything seems fine to me.
This error usually occurs when a variable is not initialized. Do you have any uiautomation in your project? On which activity is this error thrown? Also, please provide Studio version.
Thank you. The activity is an Outlook send e-mail activity. It does not use any variables but all of the data is sent as string in the required fields.
I can’t upload a file, because I’m a new user
I have entered the destination address, the subject and the body of the e-mail, in the activity, but it still doesn’t work.
What if you try to put the activity in a separate sequence? Please check to have the latest UiPath.Mail.Activities package. From Activities panel - Manage packages.
Have moved it to a new sequence and also tried to create a completely new sequence with newly added activity and entered all the data as you have it above. Nothing work. The version is the newest one, I guess. Maybe something changed on our exchange server, which doesn’t allow this kind of connection? I have no clue about exchange…
Can you please paste here the whole error message? And Studio version please(you’ll find it in Studio - Help under the UiPath logo). And UiPath.Mail.Activities package version:
Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized).
Exception Type: NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
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)
The version is 1.1.6562.21018
Installed on the 15th of Feb 2018
Yep. It worked at the beginning of the week. The only thing that changed was that I’ve added activities to the workflow…
@sodoraz I’m having the exact same issue but with incoming mail. It was working one day and the next it just started failing. I’m trying to parse the properties from the OutlookGetMailMessages activity and all the From and Sender properties fail.
email.Subject works fine email.To.Item(0).Address works fine email.From.Address fails emailmessage.From.DisplayName fails email.Sender.Address fails email.Sender.DisplayName fails
The one thing I can point to is we did some work on our Exchange server (we’re in the middle of migrating from 2010 to 2016) the night between success and failure. I’m going to meet with our Exchange admins this week to see what changes were made.
Sorry for my late reply. The only resolution I could find was to change the activity from Outlook Mail message to Exchange Mail message.
That one works well.
Hi @ovi,
I’m using Send outlook Mail Message.But receiving the Timeout error.
Please find the details below:
InvokeSendEmailError has thrown an exception
Source: Send Outlook Mail Message
Message: The operation has timed out.
Exception Type: TimeoutException
System.TimeoutException: The operation has timed out.
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)