This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Process Step - SendRichMail Task - Attachment Parameter

Dear all,

I am trying to send an email with Login + Password to a certain type of customers. Our business would like to add an attachment (pdf file) to this email.

I tried a test for the Attachment parameter (of the SendRichMail task of the process step):

Value = "\\D1jdfrdtc01\c$\D1IM\Attachment\toto.txt"

where d1jdfrdtc01 is our job server name.

In the explorer of the job server, in the search bar, the path + file are correct and I can open the file.

It is not correct nevertheless when running the process:

The process step is in error:
ErrorMessages = [System.UnauthorizedAccessException] Access to the path '\\D1jdfrdtc01\c$\D1IM\Attachment\toto.txt' is denied.
   at VI.JobService.ProcessorThread._ThreadFunction()
   at VI.JobService.ProcessorThread._ExecuteJob(Job job)
   at VI.JobService.JobComponents.MailComponent.Activate(String task)
   at VI.JobService.JobComponents.MailComponent._SendRichMail()
   at System.Net.Mail.Attachment..ctor(String fileName)
   at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   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.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

I have checked permissions of our service account (D-dell1-job1) running jobs on the job server and it is ok (all checkboxes (e.g.: Full Control, Modify, Read...) ticked for permissions of the account on the folder).

We are using a 7.0.2 version (no more supported but are currently in contact with your colleagues for an upgrade scenario this year).

Kind regards,

Pascal

  • Did you try to use a real share instead of the built-in admin$ share (c$)? So something like \\D1jdfrdtc01\SHARED\D1IM\Attachment\toto.txt

  • Thx for your quick reply and this good idea. I will test this with our infrastructure team and keep you posted...

    We did some tests but they are nevertheless all unsuccessful.

    After creation of an Attachment$ folder sharing.

    1) Value = "\\D1jdfrdtc01\Attachments$\toto.txt"

    Process step in error but with a different error message than the previous one:

    ErrorMessages = [System.IO.IOException] The network name cannot be found.

       at VI.JobService.ProcessorThread._ThreadFunction()
       at VI.JobService.ProcessorThread._ExecuteJob(Job job)
       at VI.JobService.JobComponents.MailComponent.Activate(String task)
       at VI.JobService.JobComponents.MailComponent._SendRichMail()
       at System.Net.Mail.Attachment..ctor(String fileName)
       at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       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.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    Reactivation of frozen Job 089dce81-f0d4-49d5-b4a4-3fbc25bd37ef with parameter ERROR

    2) Use of the job server IP address instead:

    Value = "\\10.201.0.188\Attachment$\toto.txt"

    Same error:

    ErrorMessages = [System.IO.IOException] The network name cannot be found.

       at VI.JobService.ProcessorThread._ThreadFunction()
       at VI.JobService.ProcessorThread._ExecuteJob(Job job)
       at VI.JobService.JobComponents.MailComponent.Activate(String task)
       at VI.JobService.JobComponents.MailComponent._SendRichMail()
       at System.Net.Mail.Attachment..ctor(String fileName)
       at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       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.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    3) Same test than in 2) but allowing all Authenticated Users (AD) to read toto.txt (in case another user than our IAM service account would be used)

    Value = "\\10.201.0.188\Attachment$\toto.txt"

    Same error:

    ErrorMessages = [System.IO.IOException] The network name cannot be found.

       at VI.JobService.ProcessorThread._ThreadFunction()
       at VI.JobService.ProcessorThread._ExecuteJob(Job job)
       at VI.JobService.JobComponents.MailComponent.Activate(String task)
       at VI.JobService.JobComponents.MailComponent._SendRichMail()
       at System.Net.Mail.Attachment..ctor(String fileName)
       at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       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.__Error.WinIOError(Int32 errorCode, String maybeFullPath)