Hi i am trying to get attachment name from the outlook mail. but for some reason i couldnt get it.
here is the error
{
“message”: “Write line: Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “16:14:08”,
“processVersion”: “1.0.0.0”,
“jobId”: “80405317-41db-40d5-a367-4c3f89f51f6e”,
“robotName”: “UK\ZP137UN”,
“machineId”: 0,
“fileName”: “ReadMerchantEmails”
}
@Rahul_kumar_S
it is working fine , you will get the error if your mail doesn’t have the attachment, so before that you can do a check item.attachments.any
Hi Rishi, thanks for your reply! i did a boolean check for item.attachments.any it is throwing false though there is an attachment in email everytime
Am not sure if you guys have encountered the same issue on any scenario.
I have attached my get outlook mail properties screenshot.
Outlook version : 2013
Uipath version : Studio 2018.3.2 - 10/30/2018
Enterprise Edition
EXE Installer
Microsoft Windows 10 Enterprise 64-bit
.NET Framework Version 4.7
Uipath mail activity package version : 1.2.6863.29868
Hi @Rahul_kumar_S
I think you are trying to use the company mailbox , there are lots of security check on the company mailbox so you won’t get the expected result. I will suggest you to try to use the same code on your personal mailbox or check with your company security team anyhow they won’t change their security policy.
how to retrieve the name of the attachment of email , attachment can be .msg .pdf .xls .xlsx format
retrieve the list of string as list of all the attachments of email ?
@prasath17 is kind of right. It’s usually better to make a new query for it. However, the answer is alreay given in the file I shared above. Good luck @Sakshi_Jain!