November 2, 2007 at 9:31 am
We’ve been using XP_SendMail with no issues just recently.
There is a stored procedure which produces a table and attaches the table to an email. This has been working perfectly for the last year or so but this month the file apparently has gotten too bigand produces the following error:
Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80004005
The attached file is approximately 10 MB. I can change the QRY to limit the number of records to less than 22,000 and it works fine. I’ve also looked at the data to make sure there is no ‘unusual’ stuff hanging around.
We are using: Miscrosoft SQL Server 2000 ver 8.00.2039
So my question is: Is there an attachment size limit on XP_SendMail?
The sysadmin has reviewed Exchange and there is no size limit on this account.
Any suggestions?
This is the procedure:
DECLARE @strQuery varchar(2000), @strMessage varchar(200)
set @strQuery = '
USE Goldmine_gacs
SET CONCAT_NULL_YIELDS_NULL OFF
select DB1. accountno, DB2.contact, db2.lastName,
DB3.email, DB1.key1 as status
FROM DB1
INNER JOIN DB2
on DB1.accountno = DB2.accountno
INNER JOIN DB3
on DB1.accountno = DB3.accountno
WHERE substring(DB1.key1,2,1) in (2,3,4,5,6)
and (DB3.contact = ''E-Mail Address''
and substring(DB3.zip,2,1) = ''1'' )
SET CONCAT_NULL_YIELDS_NULL ON
'
EXEC master..xp_sendmail @recipients = 'name@location.city',
@query = @strQuery,
@subject = 'Enter subject here',
@message = 'Enter message here',
@attach_results = 'TRUE', @width = 250
GO
Thanks.
November 2, 2007 at 10:27 am
If there's a size issue, I'd think it would be with Exchange. Can you send the file from your account with no issues? Can you log into the server with the SQL Server service account and send it from Outlook?
If anything, I'd think the size causes some type of timeout.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply