Hello,
I am having issue getting the email body using Get Outlook Mail Messages activity
the body property returning empty string
also tried with Header property . returning empty string
please assist
Hello,
I am having issue getting the email body using Get Outlook Mail Messages activity
the body property returning empty string
also tried with Header property . returning empty string
please assist
Provide the details
let me know if anything else needed
the commented out is the original activity
was trying with get outlook desktop mail message activity, still giving same issue
the email that the script trying to read is the email sent by azure devops
@nikhil.chandre Looks like after reading get outlook mail message you are not storing into variable so you are getting empty.
im storing it into mail_message variable. i got mail subject . i want mail body
Check the mail_message value through the locals panel or immediate panel.
The could be the chance that email is the failure email we receive in case of invalid recipient.
List(1) { MailMessage { AlternateViews=AlternateViewCollection(0) { }, Attachments=AttachmentCollection(0) { }, Bcc=MailAddressCollection(0) { }, Body=“”, BodyEncoding=null, BodyTransferEncoding=Unknown, CC=MailAddressCollection(0) { }, DeliveryNotificationOptions=None, From=null, Headers=HeaderCollection(6) { “Uid”, “Date”, “DateCreated”, “DateRecieved”, “DateReceived”, “Size” }, HeadersEncoding=null, IsBodyHtml=false, Priority=Normal, ReplyTo=null, ReplyToList=MailAddressCollection(0) { }, Sender=null, Subject=“[Manual Validation pending]”, SubjectEncoding=null, To=MailAddressCollection(0) { } } }
the value in mail_message
@nikhil.chandre Can you give a try by changing subject.
This looks like an empty object of MailMessage datatype.
Check if you are assigning any default value to the variable like New MailMessage
You can try updating the Mail package to latest possible version.
i got the mail subject till
not assigning it to any default value . its direct assign to get outlook mail activity
also updated the package to latest version
@nikhil.chandre Is it possible to share your xaml
i’m sorry, cant share
PFB collection after fetching mail
There is some values in the attchment collection
Also the email received is from azure devops when a release is deployed. its automated email
MailMessage
{
AlternateViews=AlternateViewCollection(0)
{
},
Attachments=AttachmentCollection(1)
{
Attachment
{
ContentDisposition=[attachment],
ContentId=“5c47da23-ae89-4272-a2af-312ee32e1184”,
ContentStream=MemoryStream
{
CanRead=true,
CanRead=true,
CanSeek=true,
CanSeek=true,
CanTimeout=false,
CanWrite=true,
CanWrite=true,
Capacity=8176,
Length=8176,
Length=8176,
Position=0,
Position=0,
ReadTimeout=!, WriteTimeout=!
},
ContentType=[application/octet-stream; name=image001.png],
Name=“image001.png”,
NameEncoding=null,
TransferEncoding=Base64
}
},
Bcc=MailAddressCollection(0)
{
},
Body=“”,
BodyEncoding=null,
BodyTransferEncoding=Unknown,
CC=MailAddressCollection(0)
{
},
DeliveryNotificationOptions=None,
From=null,
Headers=HeaderCollection(6)
{
“Uid”,
“Date”,
“DateCreated”,
“DateRecieved”,
“DateReceived”,
“Size”
},
HeadersEncoding=null,
IsBodyHtml=false,
Priority=Normal,
ReplyTo=null,
ReplyToList=MailAddressCollection(0)
{
},
Sender=null,
Subject=“FW: [Manual Validation pending]”,
SubjectEncoding=null,
To=MailAddressCollection(0)
{
}
}
Can you show how your email looks like?
It seems pretty much simple and normal email. Would you be able to connect over a call? I would try to help.
@ashokkarale
i would be able to discuss here only. sorry
@nikhil.chandre Alright! We tried all possible solutions. Let’s see what others suggests.
Can you try mail_message.HtmlBody for output?
mail_message.BodyAsHtml is available
had tried, still gave empty value