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 Administration (2000)
 Problem in sending sql email

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-04-15 : 07:44:07
varun writes "I have got the problem in sending an email from sql server, when the @body parameter length is more then 8000 character.
Is there any way get around of this problem.??"

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2003-04-15 : 09:50:14
BOL Says,

The Query results OR the Message can be upto 8000 bytes only. Use attachments to send Data more than 8000 bytes.


Sekar
~~~~
Success is not a destination that you ever reach. Success is the quality of your journey.
Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2003-04-15 : 14:39:49
You can insert/store your message in a text column and select it using @query e.g.

 
CREATE TABLE ##texttab (c1 text)
INSERT ##texttab select REPLICATE('a',8000)
INSERT ##texttab select REPLICATE('b',5000)

DECLARE @cmd varchar(56)
SET @cmd = 'SELECT c1 FROM ##texttab'
EXEC master.dbo.xp_sendmail 'jimbo',
@query = @cmd, @no_header= 'TRUE'
DROP TABLE ##texttab




HTH
Jasper Smith

0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27
Go to Top of Page
   

- Advertisement -