Encrypted mail forwarding problem

I have an agent to forward email to helpdesk.if email is normal email, the following coding is work fine. but if the one of the email encrypted, the code is stoped, and the rest of the email document cannot be forward.

anybody help me with this?

Many thanks!

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim collection As NotesDocumentCollection

Dim docA As NotesDocument

Dim docB As NotesDocument

Dim SpringUser As notesname

'Getting all the documents that approved mailbox for action,

Set db = session.CurrentDatabase

Set collection = db.UnprocessedDocuments

Set docA = collection.getfirstdocument

While Not docA Is Nothing

Set springuser = New notesname(docA.from(0))

'Create a new document

	Set docB = New NotesDocument( db )

'Copy the contents to the new document

	Call docA.CopyAllItems( docB, True )

'Assign new form as Memo

	docB.form = "Memo"

	docB.copyto = ""

	docB.blindcopyto = ""

	docB.subject = docB.subject(0)

'Send to Spring_helpdesk@juzcall.com.sg

Call docB.send(False,“spring_helpdesk@juzcall.com.sg”)

'Mark the email as processed

Call session.updateProcessedDoc(docA)

Set docA = collection.getNextDocument(docA)

Wend

End Sub

Subject: Encrypted mail forwarding problem

The message can not be forwarded without first decrypting it.

You’re trying to run this code in an agent that is running without the private key that is required to decrypt the message.

There is no magic solution for that.

But you can at least move on to the next document. Use an “on error” statement and a “resume” statement to trap the error and continue.

Subject: RE: Encrypted mail forwarding problem

Thank you!