Vinay
It would be helpful to know what is your underlying procedure for sending email, xp_sendmail (which uses MAPI) and requires Outlook to be installed on the server, or is it the extended stored proc create by Gert Draper that just allows you to send directly through SMTP?
Finding or writing a better xp would be one way. For now I will assume you are using xp_sendmail
Two approaches
1) Write your message to a file and attach it to the email
xp_sendmail @recipients = '
[email protected] '
,@message = 'See attached file' -- limited to 8000
,@attachments = 'c:\MyMessage.txt' -- no limit
,@subject = 'subject'
2) Send your message as a query (either in the body or as an attachment)
xp_sendmail @recipients = '
[email protected]'
,@query = 'SELECT Header + Message + Footer FROM EmailMessages' -- Table you create where you store your info
,@subject = 'subject'
,@attach_results = 'true'
David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com