SMTP Script Task is changing attachments path

PIBFSteve 1 Reputation point
2021-09-01T16:41:10.493+00:00

0

I have developed an SSIS package that uses a fully qualified path for attaching a file to an smtp component. The attachment line looks like this:

Attachment attach = new Attachment("\server\sharedfolder\ssis\processes\labelprinting\LabelsToPrint.xlsx");

But whenever I execute the package on my local I get the following error:

Error: 0x1 at Script Task: Could not find a part of the path 'C:\server\sharedfolder\ssis\processes\labelprinting\LabelsToPrint.xlsx'.

Why is c: being prepended to my attachment which is causing the error?

This used to work until a couple of days ago but without any changes it is failing now.

Any help would be appreciated.

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
522 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,427 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PIBFSteve 1 Reputation point
    2021-09-02T13:36:03.85+00:00

    Thank you Kael. Wasn't sure what tag to use so appreciate the change.

    steve

    0 comments No comments