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)
 Limitations to @Recipients in xp_sendmail

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-08 : 09:51:23
Vijay writes "Hi,
I just trying to send mass emails using xp_sendmail. I am just curious to know if there is any size limitations for @recipient variable. How may email address can this variable hold?
Thanks for your help in this.
-Vijay"

1fred
Posting Yak Master

158 Posts

Posted - 2002-10-08 : 11:14:20
This is an example I found in BOL. This does not specify about the @recipient value, but I assumed the same should apply

E. Send messages longer than 7,990 characters
This example shows how to send a message longer than 7,990 characters. Because message is limited to the length of a varchar (less row overhead, as are all stored procedure parameters), this example writes the long message into a global temporary table consisting of a single text column. The contents of this temporary table are then sent in mail using the @query parameter.

CREATE TABLE ##texttab (c1 text)
INSERT ##texttab values ('Put your long message here.')
DECLARE @cmd varchar(56)
SET @cmd = 'SELECT c1 FROM ##texttab'
EXEC master.dbo.xp_sendmail 'robertk',
@query = @cmd, @no_header= 'TRUE'
DROP TABLE ##texttab



Go to Top of Page
   

- Advertisement -