Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can SQL Server email out files as attachments? 1

Status
Not open for further replies.

Wyldcard9

Programmer
Feb 5, 2004
82
US
Is it possible to use Microsoft SQL Server to email out file(s) as attachments?

I would like to create a table that has multiple entries with the email address(es), and file(s) to be emailed out.

I am just not sure if it is possible. I saw the email in the DTS; but have not used that a lot; and not sure if I can make the query driven or not.

The users want to scan some documents into our SQL Database(using Kovis), and have it automated email out daily. The catch is the email output can be different per document. So I will need to have that information in the table based on the input information from the scan. Our scan application does not have an email option that is flexible. I was planning a table with the scanned directory structure, and other identifying information; a table with identifying information and email addresses(that users may change); then a third table to combine them. A job that would read that third table, and email out the file(s). Am I making it too complex? Is there a better way of designing this?
 
See xp_sendmail in bol.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
nigelrivett,

Thanks a lot!!

I looked up xp_sendmail in the help files, and have a question about the attachments. Can you zip and/or password protect the attachment? Does that need to be done before the file is attached in the email?
 
Do it before the attach. Winzip has a command line interface.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top