Save attachment activity is not working for a specific mail using uipath giving an error #SaveAttachment #Activity

RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping System.ArgumentException: Illegal characters in path

1 Like

@poonam_panchal Can you check the name of the attachment or the path where you want to store/save the file ?

This error most probably happens when you have a filename/filepath having non-acceptable characters in it’s name such as \ or / or ? kind of characters.

@supermanPunch Thank you for the reply… mail has the attachment and it’s named like
“2332 SomeText_Sometext_Sometext_Sometext56 Sometext_Bill 40.pdf”

@supermanPunch So Any idea, how I can handle this?

@poonam_panchal Can you also maybe Share the folder path or check the full Folder Path where you want to store the file if there’s any special characters or such ?

@supermanPunch it would be like a local store e.g. “D:”

@poonam_panchal…i have faced the same issue yesterday…reason I was using mail.subject and then .eml …and my subject contains so many illegal characters (for folder creation) …like , : . Etc etc…

Finally I used substring(0,3) for just trying to get 3 bytes from the subject and it worked…

So could you please chk this?

1 Like

@prasath17 I tried but, can you tell me how I can modify the attachment name of the mail before or while downloading the attachment. Any idea. Thank you

@poonam_panchal - I tried to download the pdf with the file name as you mentioned and it worked for me…

So i am suspecting that the error has something to do with the folder path, could you please share the screenshot for that activity?

In case, it is like this…

@prasath17 - folder path is just like this “D:\mails” …I have attached the screenshot for more details.

@prasath17 other attachments from other mails are being saved successfully but having an issue for only one particular sender of the mail.

@poonam_panchal - Please have a look here…this may help…