I am having problems reading the body of encrypted emails in the sql mail account of Microsoft SQL Server 2000. The passwords are configured within the account so that anyone with access to the account can open them without being prompted for a password. However, when I try to access them programmatically with SQL, I cannot retrieve the body of the email. I can retrieve the subject of the email, but not the body. With unencrypted emails I can retrieve everything.<BR><BR>I am running a test script to return the subject of the email and the number of bytes in the body:<BR><BR><BR>declare @hMessage varchar(8000)<BR>declare @MessageText varchar(8000)<BR>declare @MessageSubject varchar(1000)<BR>declare @skip_bytes int<BR>declare @msg_length int<BR><BR>EXEC master..xp_findnextmsg @msg_id=@hMessage OUT<BR>WHILE @hMessage IS NOT NULL<BR>BEGIN<BR>set @skip_bytes = 0<BR> <BR>exec master..xp_readmail<BR> @msg_id = @hMessage, <BR> @message = @MessageText OUTPUT, <BR> @skip_bytes = @skip_bytes OUTPUT, <BR> @msg_length = @msg_length OUTPUT, <BR> @Subject = @MessageSubject OUTPUT<BR><BR>print @MessageSubject<BR>print @skip_bytes<BR>print &#039;*************************************&#039;< BR><BR>EXEC master..xp_findnextmsg @msg_id=@hMessage OUT<BR>END<BR><BR><BR><BR>The results I get are as follows:<BR><BR>Subject #1<BR>8000<BR>************************************ *<BR>Subject #2<BR>0<BR>*************************************<B R>Subject #3<BR>1427<BR>************************************ *<BR>Subject #4<BR>0<BR>*************************************<B R><BR><BR><BR>All of the results of "0" are from encrypted emails that definitely have information in the body of the email, but SQL is not able to get to the body and returns a value of 0 for the number of bytes in the body. The unencrypted emails return the number of bytes in the body without problem.<BR><BR>Does anyone know what I have to do to programmatically read the body of an encrypted email with SQL?