configure hcl notes out of office to run in mixed environments - notes 9/8/7/6


HCL Notes and Domino: Tips & Tricks

Configure HCL Notes Out Of Office to run in mixed environments - Notes 9/8/7/6
August 14, 2007 (Modified date: May 9, 2013)

By Lance Zakin, HCL CASA, CAAD
Notes and Domino
HCL BP NotesMail
If you enabled "Service" Out-of-Office type on your Domino 9/8 server in a mixed environment with Notes 9/8/7/6 clients and mailbox designs you will notice that the OOO no longer runs unless the user has a Notes 9/8 client and mailbox design. You can resolve this issue by adding the formula agent below to the Notes 7/6 mailbox designs as a temporary OOO solution until you upgrade them to Notes 9/8 client and mailbox design. The user can still use the Out of Office native user interface which integrates with this formula agent. Otherwise, if you do not want user to use native interface, then you can set 7 parameters in the agent as commented in the code.

The code below can be copy and pasted into a Formula agent. The agent trigger should be set to "On event - After new mail has arrived". This agent works similar to the Out of Office function shipped with Notes, however, the "From" address will display as the Domino Server Name. Due to this "From" address issue the agent will prepend the mailbox owner name to the Subject line. A sender will only receive one out of office notification during a vacation period if multiple emails are sent. The agent will notify the Mailbox Owner with an Out-of-office Summary on the Out of Office returning date. If you plan to roll out the agent to several people in your company, then consider changing the trigger to "on schedule - More than once a day - Run agent every 1 hour" and acting on "All new and modified documents since last run" to minimize server load during peak hours.

NOTE: If you enabled "Agent" Out-of-Office type on your Domino 9/8 server or still using a Domino 7/6 server... The Notes 9/8/7/6 Out of Office function which ships with Notes defaults to run every 6 hours from 4am to 12am (only applies to Notes 9/8 when set to 'Agent' Out-of-Office type) . The schedule and frequency can easily be modified by changing the mail template "OutOfOffice" LotusScript agent schedule which will affect all mail users the next time the Domino Design task runs. What do you do if a high profile user requests to increase the notification frequency of the Out of Office notification only for a single mailbox? You can either (1) Modify the Out of Office LotusScript agent schedule on the single mailbox and check the "Prohibit design refresh or replace to modify" option, or (2) Create an Out of Office agent using the Formula agent code below.

Formula agent code:
REM;
REM {Out of Office (OOO)};
REM {Coded by Lance Zakin - www.notesmail.com};
REM;
REM {INSTRUCTIONS};
REM {1. Modify 7 field values below before leave of absence and save agent.};
REM {2. Enable agent (Select agent checkbox).};
REM;
REM {UseOOONativeData: Use Out of Office native user interface data? If @True, all 6 fields below do not apply. i.e. @True or @False};
REM {LeaveDate: First day out. i.e. @Date( year ; month ; day )};
REM {ReturnDate: First day back. i.e. @Date( year ; month ; day )};
REM {ReplySubject: Subject displayed to email senders.};
REM {AddSubjectDate: Append return date to subject. i.e. @True or @False};
REM {Message: Additional body text displayed to email senders.};
REM {NoReplyInternetEmail: Do not automtically reply to mail from internet addressses. i.e. @True or @False};
REM;
UseOOONativeData := @True;
LeaveDate := @Date(2012; 5; 25);
ReturnDate := @Date(2012; 5; 31);
ReplySubject := "Out of the office";
AddSubjectDate := @True;
Message := "I will respond to your message when I return.";
NoReplyInternetEmail := @False;
REM;
REM {DO NOT CHANGE THE CODE BELOW.};
REM;
OOODisableFlag := @GetProfileField("IVE_OutofOfficeProfile"; "OOODisableAgentFlag");
@If(OOODisableFlag = ""; @Set("OOODisableFlag"; @True); "");
FirstDayBack := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "FirstDayBack"); "");
@If(UseOOONativeData; @Set("ReturnDate"; FirstDayBack); "");
@If(@Today >= ReturnDate & OOODisableFlag; @Return(""); "");
OOONativeStatus := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "CurrentStatus"); "");
@If(UseOOONativeData & OOODisableFlag & OOONativeStatus != "1"; @Return(""); "");
REM;
CR := @NewLine;
FirstDayOut := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "FirstDayOut"); "");
GeneralSubject := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "GeneralSubject"); "");
GeneralMessage := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "GeneralMessage"); "");
AppendSubject := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "AppendSubject"); "");
ExcludeInternetEmail := @If(UseOOONativeData; @GetProfileField("OutOfOfficeProfile"; "ExcludeInternetEmail"); "");
@If(UseOOONativeData; @Set("LeaveDate"; FirstDayOut); "");
@If(UseOOONativeData; @Set("ReplySubject"; GeneralSubject); "");
@If(UseOOONativeData; @Set("AddSubjectDate"; AppendSubject); "");
@If(UseOOONativeData; @Set("Message"; GeneralMessage); "");
@If(UseOOONativeData; @Set("NoReplyInternetEmail"; ExcludeInternetEmail); "");
@If(AddSubjectDate = "1"; @Set("AddSubjectDate"; @True); AddSubjectDate = ""; @Set("AddSubjectDate"; @False); "");
@If(NoReplyInternetEmail = "1"; @Set("NoReplyInternetEmail"; @True); NoReplyInternetEmail = ""; @Set("NoReplyInternetEmail"; @False); "");
@If(NoReplyInternetEmail & @IsAvailable(SMTPOriginator); @Return(""); "");
MBOwnerTemp := @GetProfileField("CalendarProfile"; "Owner");
MBOwner := @If(@Trim(MBOwnerTemp) = ""; @DbTitle; MBOwnerTemp);
REM;
DisableMsgSuffix := "NOTE: If you would like to disable the custom formula Out of Office Agent from running during future absences for " + @DbTitle + " on " + @Name([CN]; @ServerName) + " - " + @Subset(@DbName; -1) + "..." + CR + "Open Mailbox Inbox and Click View - Agents, then Select appropriate Out of Office Agent with adjacent check mark and click Disable button.";
DisableSummary := @GetProfileField("IVE_OutofOfficeProfile"; "AlreadyNotified");
DisableMsg := "While you were out, the following people were notified of your absence:" + CR + CR + @Implode(@Name([Abbreviate]; DisableSummary); CR) + CR + CR + CR + CR + DisableMsgSuffix;
@If(@Today >= ReturnDate & !OOODisableFlag;
@Do(@MailSend(MBOwner ; ""; ""; "Out-of-office Summary [Sent by " + @Name([CN]; MBOwner) + "]"; DisableMsg; ""); @SetProfileField("IVE_OutofOfficeProfile"; "OOODisableAgentFlag"; @True); @Return("")); "");
REM;
@If(DeliveredDate >= LeaveDate; ""; @Return(""));
ProfileDate := @GetProfileField("IVE_OutofOfficeProfile"; "Date") ;
@If(ProfileDate = LeaveDate; ""; @Do(@SetProfileField("IVE_OutofOfficeProfile"; "Date";
LeaveDate); @SetProfileField("IVE_OutofOfficeProfile"; "AlreadyNotified"; "")));
ProfileNotified := @GetProfileField("IVE_OutofOfficeProfile"; "AlreadyNotified") ;
Sender := @If(@IsAvailable(SMTPOriginator); SMTPOriginator; From);
@If(@IsMember(Sender; ProfileNotified); @Return(""); "");
@SetProfileField("IVE_OutofOfficeProfile"; "AlreadyNotified"; Sender : ProfileNotified);
Footnote1 := "Note: This is an automated response to your message \"" + Subject + "\" sent on " + @Text(PostedDate) + ".";
Footnote2 := "This is the only notification you will receive while this person is away.";
OOOSubject := "AUTO [Sent by " + @Name([CN]; MBOwner) + "]: " + ReplySubject + @If(AddSubjectDate; " (returning " + @Text(ReturnDate) + ")"; "");
Remark := "I am out of the office until " + @Text(ReturnDate) + "." + CR + CR + Message + CR + CR + CR + CR + CR + Footnote1 + CR + CR + Footnote2;
@SetProfileField("IVE_OutofOfficeProfile"; "OOODisableAgentFlag"; @False);
@MailSend(Sender; ""; ""; OOOSubject; Remark; "");

.