Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Pass variable to file attachment in send mail task

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2009-09-30 : 16:12:13
Hi,

I am trying to pass variable to fileattachment in sendmail task.This task is working fine if I pass the file path and file name, I am getting email with file attachment, But I want to schedule this task to pick file with different names every week , file path and file extension are same all the time. How do I set this up in the variable, so job will run every week and should pick up new file?

Please advise.
Thanks

weipublic
Starting Member

19 Posts

Posted - 2009-10-03 : 16:53:28
Create a variable.
Edit the Send Mail Task, under the Expressions, open the Property Expression Editor, set the variable to FileAttachments Property.
Create a Package Configuration, in the Package Configuration Wizard, select the value of the variable(it will appear in the configuration file).
Deploy the package. Whenever needed, just change the value in the configuration file.
Go to Top of Page
   

- Advertisement -