Je crée une procédure pour envoyer des e-mails automatiques. L'email arrive à l'adresse et tout semble fonctionner correctement mais le corps ne peut pas être vu. J'utilise sql 2005 et MS Exchange Server 2007. La partie de la procédure qui écrit le corps est la suivante.Le corps de l'e-mail ne peut pas être vu lors de l'utilisation de sp_send_dbmail dans le serveur SQL 2005
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'
Merci, c'était le problème. –