Hello guys,
I have a user who left the company not to long ago. He had I important rule in the company. I would like to set a kind of “Out of Office” message saying that he no longer work at this company when a e-mail arrives in his mailbox.
Does someone knows how to do this in a elegant way?
Subject: User left company. How to set a “User Left the company” message.
Enable out of office agent and set it’s ‘Run on behalf of’ to the user…
Oh Make sure to edit the out of office profile so that it read something like:
if this email is business related, please resend this email to replacement@company.com
otherwise if please send to user@newemailaddress.com
The last line is optional, but nice to have.
Chers
Chin Perera
chin.perera@bigpond.com
Subject: User left company. How to set a “User Left the company” message.
Hey there,
I usually would just schedule a simple agent like this… don’t forget to format the message and subject.
Sub Initialize
'********************************************
'This agent will auto respond to emails in the inbox of a mail database
'It should be scheduled to run on the desired schedule (suggest hourly)
'You can customize the message under the Sendmail sub routine
Dim s As New NotesSession
Dim db As NotesDatabase
Dim iView As NotesView 'Inbox
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim doc As NotesDocument
Dim sTo As String
Set db = s.CurrentDatabase
Set iView = db.GetView("($Inbox)")
Set vc = iView.AllEntries
Set entry = vc.GetFirstEntry
While Not entry Is Nothing
Set doc = entry.Document
sTo = doc.From(0)
Call Sendmail(sTo, db)
Set entry = vc.GetNextEntry(entry)
Wend
Call vc.PutAllInFolder("AutoResponded", True)
Call vc.RemoveAllFromFolder("($Inbox)")
End Sub
Sub Sendmail(Fr As String, db As NotesDatabase)
Dim msg As String
Dim subj As String
Dim prin As String
'Variables - Change these to format the message and subject line of the email
msg = "Thank You for contacting ABC Company." & Chr(13) & Chr(13) & _
"Mr. William Smith, has left the organization."
subj = "Blah Blah"
prin = "" 'This is the principal field
Dim maildoc As NotesDocument
Set maildoc = db.CreateDocument
Dim rtitem As NotesRichTextItem
maildoc.Form = "Memo"
maildoc.SendTo = Fr
maildoc.Subject = subj
maildoc.Principal = prin
Set rtitem = New NotesRichTextItem( maildoc , "body" )
Call rtitem.AppendText(msg)
Call maildoc.Send(False)
End Sub
HTH
Mark
Subject: RE: User left company. How to set a “User Left the company” message.
Thanks Mark…