Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-09-05 : 09:44:32
|
| Jeff writes "I would like to save attachments sent to my SQL Server email address to directory that is different from the default. Seems easy enough - I should be able use xp_readmail to get the attachment path & filename and then xp_cmdshell to save to the specified directory, then xp_deletemail to delete the message.My problem is the following: xp_readmail shows the attachment path as:C:\DOCUME~1\BOUNDL~1\LOCALS~1\Temp\file.txtFine. However, in the temporary directory (C:\DOCUME~1\BOUNDL~1\LOCALS~1\Temp\) the file appears twice (same date & size) as:08/29/2001 11:19a 161,847 SOF13.tmp08/29/2001 11:19a 161,847 SOFD.tmpThe .tmp files include the entire email, header and attachment.How can I get the attachment out of the email and saved into the file system (with a name corresponding to the original attachment)?Also, deleting the email does not seem to delete these .tmp files...SQL Mail configured with the following:SQL Server 2000 SP1Outlook 2000I have the above working on a test environment using SQL 7: the attachments go into the C:\WINNT directory and the attachment file path returned by xp_readmail corresponds with the original attachment filename appearing and the file in C:\WINNT.Another SQL Mail bug in SQL 2000? I just installed SP1 to solve the the msg_id problems affecting SQL Mail in the non-sp SQL 2000 release...Thanks.Jeff" |
|
|
|
|
|