Solved

Appending attachment using sp_send_dbmail

Posted on 2008-06-25
1
856 Views
Last Modified: 2008-06-25
The email sends, but without the attachment.  Is there a problem with the code or does something need to be manipulated within the SQL Server settings?

msdb.dbo.sp_send_dbmail  @profile_name =  'Test' ,
@recipients = 'bill123453@yahoo.com',
@subject =  'Test' ,
@body =  'Test' ,
@query_attachment_filename =  'C:\Test.txt'
0
Comment
Question by:srejja
[X]
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
1 Comment
 
LVL 8

Accepted Solution

by:
sbagireddi earned 500 total points
ID: 21868578
Database Mail uses the Microsoft Windows security context of the current
user to control access to files. Therefore, users who are authenticated with
SQL Server Authentication cannot attach files using @file_attachments.

Are you authenticated as a SQL user.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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…

724 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