Tip

Create Your Own "Out Of Office" Agent

The formula code can be seen below which can be copy and pasted. The agent
trigger should be set to "If New Mail Has Arrived". A person will only receive
one out of office notification during a vacation period if multiple emails are
sent.

WORKS GREAT! But, if you plan to roll agent out to several people in your
company change the trigger to "On Schedule Daily" and acting on "All new and
modified documents since last run" to minimize server load during peak hours.
REM;
REM "Out of Office (OOO)";
REM "Coded by Lance Zakin - Lzakin@ivesco.com";
REM;
REM "INSTRUCTIONS";
REM "1. Modify 4 field values below before leaving for vacation and save
agent.";
REM "2. Enable agent (Select agent checkbox).";
REM;
REM "LeaveDate: First day out on vacation. i.e. @Date( year ; month ; day )";
REM "ReturnDate: First day back at work. i.e. @Date( year ; month ; day )";
REM "IntranetMsg: Message displayed to people inside company.";
REM "InternetMsg: Message displayed to people outside company from common
domain types .com, .edu, .mil, .gov";
REM;
LeaveDate := @Date(2000; 3; 10);
ReturnDate := @Date(2000; 3; 12);
IntranetMsg := "I will respond to your message when I return. If this is an
emergency I can be paged at 917-555-1212.";
InternetMsg := "I will respond to your message when I return. If this is an
emergency I can be paged from web site http://www.mobile.att.net using pin
number 5165551212.";
REM;
REM "Do not change code below.";
REM;
@If(@Today >= ReturnDate & Subject != "DISABLE OOO AGENT";
@Do(@MailSend(@UserName; ""; ""; "DISABLE OOO AGENT"; ""; ""); @Return(""));
"");
@If(DeliveredDate >= LeaveDate; ""; @Return(""));
ProfileDate := @GetProfileField("OOO"; "Date") ;
@If(ProfileDate = LeaveDate; ""; @Do(@SetProfileField("OOO"; "Date";
LeaveDate); @SetProfileField("OOO"; "AlreadyNotified"; "")));
ProfileNotified := @GetProfileField("OOO"; "AlreadyNotified") ;
@If(@IsMember(From; ProfileNotified); @Return(""); "");
@SetProfileField("OOO"; "AlreadyNotified"; From : ProfileNotified);
CR := @NewLine;
Message := @If(@Contains(@LowerCase(SMTPOriginator); ".com" : ".gov" : ".net" :
".edu" : ".mil"); InternetMsg; IntranetMsg);
Subject := @Name([CN]; @UserName) + " is out of the office.";
Remark := "I will be out of the office from " + @Text(LeaveDate ) + " until " +
@Text(ReturnDate ) + "." + CR + CR + Message;
@MailSend(From; ""; ""; Subject; Remark; "");

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.