File Not Found

Hi All,

I am getting a file not found exception when sending an email with attachments - even if the folder contains files.


do you mind attaching workflow.

Main(Autosaved).xaml (17.1 KB)


Looks like you haven’t passed any “attachment” in the value field.
Please create an argument and pass you attachment file.

I got the invoke method from the forum here and the discussion suggested we do not mention any argument . I am using this flow to attach multiple files in a single mail. I cannot pass it as an argument because the files names vary.

The following is the flow I got from forum:

they did with Send SMTP Mail Message and your trying to do with "Send Outlook Mail Message.
I’m not sure how that woks for outlook.

But anyway if your requirement doesn’t consist of sending all attachment together then you can send one after another by created X variables in attach files and iterate the directory files (for each) and attach the path to the variables and send email (file count is <= X)

I will have to send all attachments in a folder together.

How about zip the attachment using invoke method and then send.
check this out.

Hey @saivig

In that Example we are passing parameter. Just check the parameter property and click on the button as shown in the snapshot.

This example already taking files from a directory mentioned and then attaching them and even files names are different it will work.

no Difference @ddpadil


I have the following passed in the invoke method

Still it throws FIleNotFound exception.

Also I ran the code in another computer with Uipath Studio and it works fine , It throws this exception when on a Front-office PC

So that means no problem with code :slight_smile: @saivig

System.IO.FileNotFoundException means the program did not find the file you specified. So please verifies the directory path you are passing is correct or not.


Found the issue- Uipath Package Mail Activities - Reinstalling it did the trick.

can we handle the situation where file is not present
i.e., it may or may not present

Sorry for delayed response :slight_smile:

simple check by using **path exists ** Activity. if it will return true that means that file or folder exists :slight_smile: otherwise not.


I had the same problem and reinstalling the mail package doesn’t solve…Is there any solution?