Question : Enable auto reply on a particular mail file

Hi,

I want to enable a auto reply in my mail box for a particular mail domain (example:@abc.com).
Please help me I have a code but it is not working.

Please help?
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Dim s As New NotesSession 
Dim db As NotesDatabase
Dim doc As NotesDocument
		
Set doc = s.DocumentContext		
Set db = s.CurrentDatabase 'Set variables 
	
	Subj = doc.GetItemValue( "Subject" )
	Frm = doc.GetItemValue( "From" )
	'Only reply to the message if it from ABC e-mail addresses and the subject does not contain "Auto Notification"
	If Instr(1, Subj(0), "(Auto Notification)") = 0 And Instr(1, Frm(0), "@ABC.com") = 0  Then
		Set maildoc = New NotesDocument (db)
		maildoc.Form = "Memo"
		maildoc.SendTo = Frm(0)
		maildoc.Principal = "Auto Notification"
		maildoc.ReplyTo = "[email protected]"
		maildoc.Subject = "RE:" & Trim$(Subj(0)) & " (Auto Notification)"
		Set rtitem = doc.GetFirstItem( "Body" )
		
'		Produce contents of reply
		Set rti = New NotesRichTextItem (maildoc, "Body")
		Call rti.AppendText ("THIS IS AN AUTOMATED E-MAIL -- PLEASE DO NOT REPLY TO THIS E-MAIL")
		Call rti.AddNewLine( 2 )
		Call rti.AppendText ("----------------------------------------------------------
		Call rti.AddNewLine( 2 )
		Call rti.AppendText(rtitem.Text)
		Call maildoc.Send(False)
	End If

Answer : Enable auto reply on a particular mail file

If Instr(1, Lcase(Subj(0)), "(auto notification)") > 0 And Instr(1, Lcase(Frm(0)), "@abc.com") > 0  Then
Random Solutions  
 
programming4us programming4us