在sql server sp_send_dbmail中指定附件的内容类型

发布于 2024-09-03 05:22:48 字数 297 浏览 13 评论 0原文

使用 sp_send_dbmail 发送电子邮件时如何指定附件的内容类型?对于 Zip、PDF 文件,内容类型指定为 application/octet-stream。但我需要将其更改为 application/zipapplication/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薆情海 2024-09-10 05:22:48

这是不可能的。如果您需要指定内容类型,则必须使用另一种方法来发送邮件。

使用您选择的语言触发脚本/可执行文件的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文