I’m doing a very simple project but i cant save the emails where i want…
Create a Folder named with the Subject, save inside The Email and The Attachments, but i have an error just when i want so save se .msg in the same folder.
But In this case i have an error:
Activity Save Outlook Email ( Save Mail X ) failed:
Error en la operación.
i check many times and i guess the problem is the “-” character in Subject, Is there any options to avoid this error?
Hello,
it doesnt work for me, i’m using StudioX, the links you provid me talk about Studio, in this case it use get mail before the FOR expression, i cant use it on StudioX.
Check that when i use Subjects with normal characters it works (“Prueba 3”), but when i use Subjects with other chars thats the output:
System.NotSupportedException: The given path’s format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at System.IO.Directory.CreateDirectory(String path)
at UiPath.Mail.Activities.Business.SaveMailX.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
hello, can you give me the exact subject or the charaters you say it throws the error? I tried using “-” in the subject and used the subject for creting the path and i got the same error and that’s a bug since the OS supports that. let me know if that is the case for you also, the “-” i mean. thank you.
so, i played a little further with it.
that might be a bug that you get any thing on the sub menu or that the folders are created inside the project folder but it can’t save to them. we will investigate
furthermore, as a workaround for you scenario, save all email with filename [subject] in a common folder, then using IF-condition builder move each file in it’s appropiate folder. You have Create Folder and Move File for that.
Subjects Like, “AUDITORÍAS SOC - SUPERVISORES 15_04_2020 TT” doesn’t work
When i jtry to save atachment in C:\MEJORAS\Auditoria<[CurrentMail.Subject]>, i get an error saving, also it made 3 Folders with current subject like this:
In the original subject in outlook client you have \ or / instead of _
AUDITORÍAS SOC - SUPERVISORES 15_04_2020 TT
the mail are automatically saved with _ instead of \ or / but when creting folder it will take into account the / that’s why you get the path splited. that’s a OS limitation.
then you can use a for each file in folder → create folder-> current file->name and will create the folder for each saved emails but with _ instead of \ or / and then move each of them to it’s appropiate folder.