Get Attachments from Outlook Mail Message

When trying to Get Outlook Mail Message the output I get doesn’t contain any Attachments (Attachments=AttachmentCollection(0)) , even though I know that the mail I receive has some. I know this by the name of the Subject i get.

Are the activity ‘Get Outlook Mail Message’ bugged, or has others experienced not being able to access their Attachments, and if so how can I fix this problem?

  1. use get mail message activity and store the out put in a variable named say mail_Msg
  2. now use if activity the condition would be mail_Msg.Attachments.Any
  3. in true block use save attachment activity.

Hope this helps

I have tried this multiple times and many variants of this.

The problem is that the object in UiPath acts as there are no Attachments, when I know that the object contains multiple attachments.

Do you know if 2019.12.0-beta.61 can communicate with outlook 1902 (Build 11328.20468)?

hope you have set this to System.Net.Mail.MailMessage

Dude, thank you for trying, but I know this. This is not what i’m asking.

2 Likes

Hi! I have the same problem. Did you find a solution?

Hello Daniel,
I can’t actually remember. I think that we tried to reinstall either Outlook or UiPath, but i can’t remember if that did the job. Sorry! I hope you have found a solution.
Cheers!

Can i get the attachment txt of the email without saving it ? and find some value from it ?

Hi !
I am facing the same issue :confused: Did you find a solution ?

I have the same issue when getting certain mail messages via IMAP. Most work fine but there is the odd one that clearly has an attachment when looking in the mail client but has an empty “AttachmentsCollection”.

I checked 2 of them and both came from “Apple Mail” client which leads me to believe that the way that client sends emails isn’t supported by the UiPath activity. Just spitballing but maybe it uses “inline attachments” in the embedded HTML mail (which btw is also not accessible via the mailmessage object).

Is this something @uipath can look into?

Maybe my custom save attachment workflow can be used here as well. Please see my post in this thread and let me know if this can be used for solving this issue as well.

Do you know if this workflow will work with objects that are Office365Message ?

I am using this method you have in your file but for some reason when I go to open the file it says I am not allowed. I can save the attachment manually and am able to open the file, but not when I use the component to download the file. Is there any reason for this?