0

在我使用的 sql 2008 中使用数据库邮件发送邮件时,我们如何将图像编码到电子邮件正文中:

    exec msdb.dbo.sp_send_dbmail
    @profile_name = 'DBMail',
    @recipients = 'goldenash21@gmail.com',
    @subject = 'DB hello',
    --@file_attachments = 'C:\logo.jpg',    
    @body='<p>Image Test</p><img src="C:\logo.jpg" width="270" height="146"" /><p>See image there?</p>' , 
    @body_format = 'HTML';

任何帮助都将是非常可观的..谢谢

4

1 回答 1

1

你几乎已经完成了:

exec msdb.dbo.sp_send_dbmail
@profile_name = 'DBMail',
@recipients = 'goldenash21@gmail.com',
@subject = 'DB hello',
@file_attachments = 'C:\logo.jpg;C:\logo2.jpg;',    
@body='<p>Image Test</p><img src="logo.jpg" width="270" height="146"" /><p>See image there?</p><img src="logo2.jpg" width="270" height="146"" />' , 
@body_format = 'HTML';

在. @file_attachments_ ;_@body

于 2012-01-12T11:08:16.200 回答