【问题标题】:How to request Read Receipts for emails sent using SQLCLR Stored Procedure如何为使用 SQLCLR 存储过程发送的电子邮件请求已读回执
【发布时间】:2015-12-14 18:32:56
【问题描述】:

我的任务是获取客户端收到的电子邮件的“已读回执”,并且这些电子邮件是使用 SQLCLR 存储过程发送的。但我无法弄清楚它是如何完成的。您能否告诉我如何为电子邮件配置已读回执?

【问题讨论】:

    标签: .net sql-server email sqlclr


    【解决方案1】:

    我原本以为使用内置的Database Mail系统和sp_send_dbmail发送邮件会比使用SQLCLR更容易、更方便,但现在看来即使在之前会是更好的选择问这个问题,现在希望请求已读回执,使用 SQLCLR 可能是要走的路,因为数据库邮件不支持该标头或传入自定义标头以手动添加它:

    Add custom header with sql server database mail

    因此,您似乎将在 .NET 中将电子邮件标头添加到您的 MailMessage 对象:

    MailMessage email = new MailMessage();
    
    email.Subject = "some exciting topic";
    // set other properties of "email" object
    email.Headers.Add("Disposition-Notification-To", "<addr_to_send_receipt_to@domain.tld>");
    

    更多信息,请参见:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-26
      • 1970-01-01
      • 2014-09-04
      • 2014-12-15
      • 2018-12-14
      • 2022-11-11
      • 1970-01-01
      相关资源
      最近更新 更多