0

I'm currently sending a report from SSRS in MHTML using a subscription so that it gets embedded in the body of the email.

I want to get similar functionality using sp_send_dbmail so that I can change the email via SQL code, however when I send the MHTML file as an attachment it is not embedded in the email body.

How can I embed the MHTML in the email body using sp_send_dbmail?

EDIT: for those asking why I want to do this instead of using a subscription, it is to integrate two existing processes in an enterprise environment. One process sends emails, the other generates report files.

FistOfFury
  • 6,735
  • 7
  • 49
  • 57
  • but why you are sending using sp_send_dbmail ??? if you want to send customized mail then better way to use "New Data-driven Subscription"... – Manoj Mar 03 '15 at 06:57
  • but why?! if you want to send the report from sql, use reportserver.dbo.addevent procedure. – busytools Mar 03 '15 at 20:41
  • why ask why? I currently have two independent processes: one that uses dbmail to send emails and another that generates MHTML files. I want to integrate the MHTML file from one process into the other process. – FistOfFury May 04 '15 at 19:03
  • @FistOfFury you got answer on that ? – Mr. Bhosale Jul 30 '21 at 17:36

0 Answers0