declare @body1 varchar(1000) set @body1='' select @body1=@body1 +'' 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'
' set @body1=@body1+'Tables
'+ name +'