Error getting the "FROM" field from a get outlook mail message activity

I had a bot in production and was good running the activity of getting outlook mail message.
But now it has failed. And when I test it, it take the mails but the field “From” is null. Like if the mail was sent by nobody, so it shows that error when trying to display the from. And I am not able to get the “from” field of the mail.

I updated all packages but I have no idea on how to solve it

image

Hey

can you try with sender instead?

CurrentMail.Sender.ToString

Regards

Didn’t work. So the value still null

and the value of the mail variable is this:

MailMessage { AlternateViews=AlternateViewCollection(1) { AlternateView { BaseUri=null, ContentId=“6b0f182c-6796-4b20-90ca-c32ec1515088”,
ContentStream=MemoryStream { CanRead=true, CanRead=true, CanSeek=true, CanSeek=true, CanTimeout=false, CanWrite=true, CanWrite=true,
Capacity=1520, Length=1520, Length=1520, Position=0, Position=0, ReadTimeout=!, WriteTimeout=! },
ContentType=[text/html], LinkedResources=LinkedResourceCollection(0) { }, TransferEncoding=Base64 } }, Attachments=AttachmentCollection(0) { },
Bcc=MailAddressCollection(0) { }, Body=@“Hola cómo estáUna prueba”,
BodyEncoding=UTF8Encoding { BodyName=“utf-8”, CodePage=65001, DecoderFallback=DecoderReplacementFallback { DefaultString=“�”, MaxCharCount=1,
MaxCharCount=1 }, EncoderFallback=EncoderReplacementFallback { DefaultString=“�”, MaxCharCount=1, MaxCharCount=1 }, EncodingName=“Unicode (UTF-8)”,
HeaderName=“utf-8”, IsBrowserDisplay=true, IsBrowserSave=true, IsMailNewsDisplay=true, IsMailNewsSave=true, IsReadOnly=true, IsSingleByte=false,
WebName=“utf-8”, WindowsCodePage=1200 }, BodyTransferEncoding=Unknown, CC=MailAddressCollection(0) { }, DeliveryNotificationOptions=None, From=null, H
eaders=HeaderCollection(8) { “Uid”, “Date”, “DateCreated”, “DateRecieved”, “DateReceived”, “HtmlBody”, “PlainText”, “Size” }, HeadersEncoding=null,
IsBodyHtml=false, Priority=Normal, ReplyTo=null, ReplyToList=MailAddressCollection(0) { }, Sender=null, Subject=“Test emial”, SubjectEncoding=null,
To=MailAddressCollection(1) { [“name lastname” name.lastname@company.com] } }

That is a quite weird, looks like any configuration or access is the issue

please have a look to this topic

yeah, I found that but tried with no use.
Was on grey and tried also on regedit, and didn’t find the respective folder.
So still stuck on this. And don’t understand why or what other activity could be done

Also, I’m not sure if office 365 is an issue, because my testing computer is on 365 but prod in normal outlook.
The weird thing is that why “From” and “sender” fields are null

Hi @JavRR

Try this out

The mailmessage object will give you access to all the attributes of the email.
Example:
For Each message in listOfMessages
Assign → sender = message.From.ToString
There is also message.Sender object. See which one gives you the correct email address you’re looking for.

Assign that to variable and then try to print it

Also if possible could you try downgrading your package as well

HI,

MailMessage.From returns MailAddress class and it doesn’t accept non email address style string. So perhaps you should use If activity to check if it’s null or not.

Regards,

Hi @JavRR, please try “mail.SenderEmailAddress” with UiPath.Mail.Activities package version 1.18.2

No solution yet from all of your replies.
And I don’t understand why individual items doesn’t get the From field, but for example I tried with the notifications I recieved from this post
for example:
[EXTERNAL] Nikhil Girish via UiPath Community Forum notifications@uipath.discoursemail.com

and I the “message.From.ToString” now works again!!! the value is not null but with other emails is nor working :frowning: very frustrated

AND ONE BIG ISSUE IS THAT ALSO IS NOT GETTING THE ATTACHMENTS