在sql server sp_send_dbmail中指定附件的内容类型
使用 sp_send_dbmail 发送电子邮件时如何指定附件的内容类型?对于 Zip、PDF 文件,内容类型指定为 application/octet-stream。但我需要将其更改为 application/zip、application/pdf。
“file_attachments”参数采用附件的绝对路径。找不到指定内容类型的地方。
我正在使用 SQL Server 2005/2008
请帮忙。谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是不可能的。如果您需要指定内容类型,则必须使用另一种方法来发送邮件。
使用您选择的语言触发脚本/可执行文件的 SQL 代理作业可能是最简单的解决方案。
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.