Send SMTP mail message activity facing problem-> Access to the path "C:\Temp\attachments" is denied


I am trying to use “send SMTP mail message activity” to send mail with pdf file attached.facing following problem

RemoteException wrapping System.UnauthorizedAccessException: Access to the path ‘C:\Temp\attachments’ 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)

please help if anyone know the solution thank you in advance :slight_smile:

Hi @rupali,
Welcome to the Community!
Looks like you are trying to perform this via Robot. Check if this folder has proper access right set in windows.

1 Like

Thank you!!!:slight_smile:

1 Like

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