Question : xp_sendmail, with attachment, Operating System Error 5

EXEC master..xp_sendmail @recipients = '[email protected]', @query = 'SELECT * FROM tblCountries', @Subject = 'Countries', @Message = 'My New Message'

The above works fine, time and again and again...

EXEC master..xp_sendmail @recipients = '[email protected]', @query = 'SELECT * FROM tblCountries', @Subject = 'Countries', @Message = 'My New Message', @attach_results = 'TRUE', @attachments = 'my.txt', @width = 1000

The above fails, time and again and again with the following result:

Server: Msg 18024, Level 16, State 1, Line 0
xp_sendmail: failed with operating system error 5

I am running the above on a server with Windows 2000 Advanced Server from my desktop which has the SAME operating system.

Please could someone tell me why the above error occurs?

Answer : xp_sendmail, with attachment, Operating System Error 5

does the asql account have privilieges to access the attachement? ntfs permissions..
Random Solutions  
 
programming4us programming4us