Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Send mail Task - attachment

Posted on 2010-08-24
17
1,189 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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.

828 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