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

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 "Out of Office (OOO)";
REM "Coded by Lance Zakin -";
REM "1. Modify 4 field values below before leaving for vacation and save
REM "2. Enable agent (Select agent checkbox).";
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";
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 using pin
number 5165551212.";
REM "Do not change code below.";
@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 last published in November 2000

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...