Solved

Send mail Task - attachment

Posted on 2010-08-24
17
1,151 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

707 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

18 Experts available now in Live!

Get 1:1 Help Now