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)
 xp_readmail to read only unread messages

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-17 : 16:27:59
Tammy writes "SQL Server 7
Windows NT 4 Sevice Pack 6

Hi

I am using a job to run xp_readmail and put the contents of particular messages into my database.

I thought that if @peek was false (default) the messages would be marked as read as xp_readmail processed them...hen the next time the job ran it would only process unread mail. However, since one message goes in the db multiple times, I guess I'm wrong.

So, I returned the @unread parameter when running xp_readmail and used an if to check for @unread = 'true' My job says it succeeds but nothing goes in the db when I try to use @unread.

Any help appreciated
Tammy"
   

- Advertisement -