Send outlook e-mail activity error

email
activities
p_qa

#1

Hi everyone,

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.

Regards,
Razvan


#2

Hi Razvan,

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.

Thanks,
Viorela


#3

Hi Viorela,

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 :slight_smile:
I have entered the destination address, the subject and the body of the e-mail, in the activity, but it still doesn’t work.

THanks,
Razvan


#4

Yeah, you need to stick around a bit :slight_smile: But you should be able to upload now since you’re a basic user.

Do your Properties look like this?

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.


#5

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…


#6

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:

It’s odd because you said it was working before, right?


#7

The full error message is:

test has thrown an exception

Source: Send Outlook Mail Message

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…


#8

@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.

Were you able to resolve your issue?

Regards
Troy


#9

Hi Troy,

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.

Regards,
Razvan