Empower R4.6 mail users to correctly set their Out-of-Office agent's "Server to run on..." option.
Code
Is your help desk vexed with countless calls of "I set my Out-of-Office agent but it doesn't seem to run when it should?"
Just add the following line to the beginning of the "Enable Out of Office Agent" action on the "Out Of Office Profile" form (i.e. Forms -> "Out Of Office Profile" -> Actions -> "Enable Out of Office Agent"):
@If(@TextToNumber(@Version)>=147; @Command([AgentSetServerName];
"ProcessOutOfOffice"; @LocationGetInfo([HomeServer])); "");
This will ensure that every time the user enables the OOO agent, that it is set to run on their home/mail server, not "Local." Also takes care of itself should the mail file be moved later on to another mail server.
NOTE:
1) The @LocationGetInfo function only works on R4.6 and above clients.
2) Assumes of course that the user's current Location (or all Locations) are properly set (i.e. specify a correct home/mail server).
3) May cause an undesirable side-effect if a "power-user" enables it when switched to a "special" Location that differs from his/her regular home/mail server (e.g. a developer using a "developer" test Location with a home/mail server set to a "test" server, not their real mail server)