Link to home
Start Free TrialLog in
Avatar of sqlagent007
sqlagent007Flag for United States of America

asked on

SSIS email an attachement from a package variable

I have created an SSIS package that will produce a .csv file as an output every month, however now they want this emailed. I thought no problem, I added a send mail task. Then I attempted to add a "FileAttachments" expression from my user::strFileName variable. This only works if the file already exists. However that does not work for me because the filename actually has the date in it, so there are never 2 files with the same name. When I try to run the package with my new "send mail task" added I get an error on package validation that the "file does not exist". The file will never exist when this runs as an automated job because the file name contains the day the package ran and it only runs 1x per month. How can I get around this?
ASKER CERTIFIED SOLUTION
Avatar of Reza Rad
Reza Rad
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sqlagent007

ASKER

This is great. Thank you
thanks again!
Glad it helped.
Cheers,
Reza