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)
 SQL Mail Bug w/SQL 2000 SP1

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-18 : 11:10:54
Daniel Carlson writes "I posted this in a newsgroup, but didn't get much feed back on it. You said you like hard questions, so I'm hopinng this is one of those. Anyway, here it is:

-----------------
Has anyone noticed a bug with SQL 2000 sp1 when trying to
process an attachment sent via email pragmatically? I
have created a stored procedure that is scheduled to run
at certain times. It basically iterates through all the
email in the inbox and processes each of them differently
based on their subject. Periodically the process will
fail with a "mail error 0x80004005" either on xp_readmail
or xp_deletemail. I'm able to duplicate this by sending
an email with an attachment, running master..xp_readmail,
and then running my procedure. By running the "master..xp_readmail" all the email goes to read
status, and after that for some reason SQL 2000 sp1 is
unable to grab the attachment anymore. If I run the proc
without reading it first, everything seems to work fine 99% of the time. I think the other 1% is related to the network (i.e. network congestion, etc). I notice that after running master..xp_readmail and then running the proc, a 0 byte temp file of the attachment is created. I also noticed that if I used set @suppress_attach to true the error code goes away, but obviously there is no attachment to process because it is being suppressed. SQL 7.0 with the most recent sp is able to do all of this fine. I've tested it on two separate installs of SQL 2000 sp1 on different machines. Both of them yield the same results. Any help is greatly appreciated. I'm almost positive it is a bug in the software. I hope it gets addressed soon.

-Dan"
   

- Advertisement -