我創建了一個發送自動電子郵件的過程。電子郵件到達的地址,一切似乎工作正常,但身體無法看到。我正在使用sql 2005和MS exchange server 2007.編寫正文的過程部分如下。在sql server 2005中使用sp_send_dbmail時無法看到電子郵件的正文
declare @bodymsg as varchar(1000)
set @bodymsg = 'The application '
set @bodymsg = @bodymsg + @appnum
set @bodymsg = @bodymsg + ' have been auto assign to you by the call center auto assign program.'
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'The borrower information is as follow:'
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'Name: '
set @bodymsg = @bodymsg + @borrower
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'Email: '
set @bodymsg = @bodymsg + @borremail
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'Phone: '
set @bodymsg = @bodymsg + @borrhome
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'Cellphone: '
set @bodymsg = @bodymsg + @borrcell
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + CHAR(13)
set @bodymsg = @bodymsg + 'Please contact the borrower ASAP.'
execute [msdb].[dbo].[sp_send_dbmail]
@profile_name = 'CallCenter',
@recipients = @email,
@subject = @subjectmsg,
@body = @bodymsg,
@body_format = 'TEXT'
謝謝你是這個問題。 – 2010-09-20 18:10:17