declare @body1 varchar(1000)
set @body1='
| '
set @body1=@body1+'Tables |
'
select @body1=@body1 +'| '+ name +' |
' from sysobjects
print @body1
exec master..usp_send_cdosysmail
@from='mak_999@yahoo.com',
@to ='mak_999@yahoo.com',
@subject ='Formatted email from MAK',
@body =@body1,
@smtpserver ='optonline.net',
@bodytype ='HTMLBody'