Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sending SQL HTML e-mail

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-12 : 07:45:56
Flaviu writes "How can I send HTML e-mail larger than 10,000 charecter ?
I'm using :
EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT
EXEC @hr = sp_OASetProperty @iMsg, 'x...','2'
EXEC @hr = sp_OASetProperty @iMsg, 'x...', 'x...'
EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null
EXEC @hr = sp_OASetProperty @iMsg, 'To',@to
EXEC @hr = sp_OASetProperty @iMsg, 'Subject', @subject
EXEC @hr = sp_OASetProperty @iMsg, 'HTMLBody', @message
EXEC @hr = sp_OAMethod @iMsg, 'Send', NULL
EXEC @hr = sp_OADestroy @iMsg


sp_sendmail is not an option because it doesn't send HTML e-mail"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-09-12 : 09:09:29
try
EXEC @hr = sp_OASetProperty @iMsg, 'HTMLBody', @message1 + @message2 + @message3

where @message1, @message2 and @message3 are each 8000 chunks.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -