Solved

Send mail Task - attachment

Posted on 2010-08-24
17
1,202 Views
Last Modified: 2013-11-10
I created a variable call Targetfile, scope is package, data is string, value is myfilelocation
In Send Mail Task Editor, Attachments, I added @[users::Targetfile], in Expression  where it say name, I selected @[users::Targetfile]
It keeps saying "either the file @[users::Targetfile] does not exist or you don't have permission....???
Need help.
0
Comment
Question by:VBdotnet2005
  • 6
  • 6
  • 5
17 Comments
 
LVL 16

Expert Comment

by:vdr1620
ID: 33514035
It looks like the account used by SSIS does not have permissions to the Folder where the file is being stored. check permissions on the Folder.. I would also suggest you to check the file path also,copy thee result of the expression as is and try to run/open it from RUN
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33514677
Try changing...
@[users::Targetfile]

To
@[user::Targetfile]

should be singular
0
 

Author Comment

by:VBdotnet2005
ID: 33524220
"It looks like the account used by SSIS does not have permissions to the Folder where the file is being stored."

I can run it fine when I don't use variable. I confirm the path and file name is correct. Is there another way to check this?
I run it under my logon.  I also changed to @[user::Targetfile]
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 16

Expert Comment

by:vdr1620
ID: 33524258
can you post your expression and the Task using this variable.. also,u r default value in the variable
0
 

Author Comment

by:VBdotnet2005
ID: 33524325
see attachment
ee.bmp
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33524341
You need to put your variable in the "expressions" section of the properties, not the "attachments" area.
0
 

Author Comment

by:VBdotnet2005
ID: 33524350
see attachment
ee.bmp
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33524351
Sorry - only put in "expressions" area.  When it validates, it's checking that attachments and doesn't know what to do.
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33524374
So just remove your variable from the attachments property area.  
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33524405
Couldn't tell from the pic, but make sure you're setting the correct property within the expression.  Should be FileAttachments.
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33524419
Ok... does this Variable evaluate to the full path of the File..In such a case it should be in written in the File attachments property not the Name...Under expressions tab
fileAttachment.jpg
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33524455
Also select the Send mail task and in properties ---> change Delay Validation --TRUE
0
 

Author Comment

by:VBdotnet2005
ID: 33524599
Ok that works. Please see error below. Please let me know if I need to open a new question for this.
ee.bmp
0
 

Author Comment

by:VBdotnet2005
ID: 33524641
see attachment
ee.bmp
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33524803
The Smtp Connection variable value should be written under Smtp connection property.. You do need to place any variable the Name property..If you have any variables under this property, delete it.. For configuration you will just need the Connection String property..Value property is not necessary.. Make sure that you  have placed your smtp variable (SMTP connection string properties.. under expressions)
0
 
LVL 16

Accepted Solution

by:
carsRST earned 125 total points
ID: 33524805
Check your property within the expression of the send mail task.  Specifically check that you're setting the "SmtpConnection" property to your variable.
0
 

Author Closing Comment

by:VBdotnet2005
ID: 33564279
Thank you
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question