Question

How can I specify the content type of an attachment when sending emails using sp_send_dbmail? The content type is specified as application/octet-stream for Zip, PDF files. But I need to change it to application/zip, application/pdf.

The "file_attachments" parameter takes absolute paths of the attachments. Can not find a place to specify content type.

I am using SQL Server 2005/2008

Please help. Thanks

Was it helpful?

Solution

This can't be done. If you need to specify content types, you'll have to use another method for sending mail.

A SQL Agent job triggering a script/executable in the language of your choice is probably the simplest solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top