I tried to set OOO mail with the following code
Document doc1=database.getProfileDocument("outofofficeprofile", null);
doc1.replaceItemValue("FirstDayOut",validStartDate);
doc1.replaceItemValue("FirstDayBack",validEndDate);
oc1.replaceItemValue("SpecialSubject", "Sorry for inconvinience i ll be out of office");
doc1.replaceItemValue("'CurrentStatus'", "1");
doc1.replaceItemValue("TaskState", "1");
doc1.save();
but its not updated in the mail file (more>Out Of Office). can any one help me how to set it programmatically. I came to know that using Java Out Of Office agent it can be done, if so Please give me the details like how to invoke the agent pro grammatically.