Solved

Send mail Task - attachment

Posted on 2010-08-24
17
1,160 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Deadlocks 12 50
email about the whoisactive result 7 27
Add '#' to end of file 2 30
T-SQL: Nested CASE Statements 4 24
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now