SMTP - acces to the path

Hello there,

I have an issue when I want to send a email through SMTP activity.
I attach a file and I have the following error message :

RemoteException wrapping System.UnauthorizedAccessException: Access to the path ‘C:\Users\T002016\Documents\Processus_RPA\Finance\Vérification des PMP\Templates’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
at System.Net.Mail.AttachmentBase…ctor(String fileName)
at System.Net.Mail.Attachment…ctor(String fileName)
at UiPath.Mail.SMTP.Activities.SendMail.SendMailTask(AsyncCodeActivityContext context, Receiver receiver, MailMessage mailMessage, CancellationToken cancellationToken, Boolean isNewMessage, String body)
at UiPath.Mail.Activities.SendMailActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.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)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Can any one knows what to do please ?

Maybe @Pablito

Thank in advance,

Kind regards

Hi @najoua.abbaci

Check With the below thread @Pablito provided the solution!


1 Like

Thank you, i have seen this. I tryied to give to this folder a proper access right, set in windows. But without any success. Maybe you can show me how to do, maybe I did something wrong.
To share my file, here is my seetings

Hi @najoua.abbaci

If I am right I think u need to add the file path instead of folder path for this


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.