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