how to handle exceptions like out of office or auto reply loops with auto reply agent code. any info is helpful.
Dim Ses As New NotesSession .
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim Memo As NotesDocument
Dim body As NotesRichTextItem
Dim sub1, sub2, addsubject As Variant
Dim myvar As Integer
Set db = Ses.CurrentDatabase
Set doc = Ses.DocumentContext
Set Memo = db.CreateDocument
addsubject = doc.GetItemValue("Subject")
'Reply to sender with the subject created from his mail subject
Memo.Subject = "Re: " + Cstr(addsubject(0)) + " -- My email address is changed now"
Set Body = New NotesRichTextItem( Memo, "Body" )
'Mention your new email address here
Call Body.AppendText("My email address is changed
sub1 = doc.GetItemValue("SendTo")
'Compare with your old email address
If (Cint(Instr(1, Cstr(sub1(0)), "email@example.com", 5))> 0) Then
sub2 = doc.GetItemValue("From")
Call Memo.Send(False, Cstr(sub2(0)) )
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!