File Not Found

outlook

#1

Hi All,

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

Thanks


#2

do you mind attaching workflow.


#3

@ddpadil
Main(Autosaved).xaml (17.1 KB)


#4

Hi,

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


#5

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:


#6

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)


#7

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


#8

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


#9

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

Regards…!!
Aksh


#10

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


#11

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.

Regards…!!
Aksh


#12

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


#13

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


#14

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.

Regards…!!
Aksh


#15

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