如何使用图像通过sql发送消息

如何使用图像通过sql发送消息,sql,sql-server,image,html-email,email-attachments,Sql,Sql Server,Image,Html Email,Email Attachments,在我的SQL中,我已经创建了配置文件和帐户 我还知道如何通过代码发送消息: USE msdb GO EXEC sp_send_dbmail @profile_name='yourprofilename', @recipients='test@Example.com', @subject='Test message', @body='This is the body of the test message. Congrates Database Mail Received By you Succe

在我的SQL中,我已经创建了配置文件和帐户

我还知道如何通过代码发送消息:

USE msdb
GO
EXEC sp_send_dbmail @profile_name='yourprofilename',
@recipients='test@Example.com',
@subject='Test message',
@body='This is the body of the test message.
Congrates Database Mail Received By you Successfully.'
**以上就是一个例子


但是,我想知道如何将图像插入到消息中。

您可以将图像的base64字符串表示嵌入到html消息中。。。Sry,我试过了,没用。