This discussion is archived
2 Replies Latest reply: Jan 24, 2007 8:36 AM by 554356 RSS

usage of ES_FOLDER_API

554356 Newbie
Currently Being Moderated
Hello everyone,

I have a very simple question: how to properly use ES_FOLDER_API.SET_FOLDER_EXPIRY() ?

This is how i use it and it does not work (i am logged as the ES_MAIL user):

select folder_id,DAYS_KEPT from es_folder where upper(folder_name) like upper('%/mailadmin2/inbox%')

, it returns 1081 and 1 (DAYS_KEPT is set by me manually)

and then:

BEGIN
es_folder_api.set_folder_expiry(1081,100);
commit;
END;

which changes nothing because when i use the select again i get the same result: 1081 and 1 .

What is the problem?

I want to create a trigger on the ES_FOLDER table so that it sets DAYS_KEPT to a number of days automatically but i'm afraid that if i set it myself and not with an API i might left something out from the update process.(the API might set some other attributes or something like it).

Any thought is appreciated.

Thank you in advance.

Irina
  • 1. Re: usage of ES_FOLDER_API
    548107 Newbie
    Currently Being Moderated
    which changes nothing because when i use the select again i get the same result: 1081 and 1 .
    What is the problem?
    You have to use the mail_session.login and es_folder_api.set_folder_expiry.

    Please check the below example .(Note : I have not tested the example)

    DECLARE
    c_user CONSTANT VARCHAR2(80) := 'mailadmin2@<domainname>';
    c_password CONSTANT VARCHAR2(80) := '<password>';
    c_ldaphost CONSTANT VARCHAR2(80) := '<LDAPHOST>.';
    c_ldapport CONSTANT NUMBER := <LDAP SERVER PORT>;
    session_id NUMBER;

    BEGIN
    --login
    mail_session.login(c_user, c_password, c_ldaphost, session_id, c_ldapport);
    es_folder_api.set_folder_expiry(session_id,'inbox',100);
    commit;
    END;

    Message was edited by:
    Ilavelan Kanniappan
  • 2. Re: usage of ES_FOLDER_API
    554356 Newbie
    Currently Being Moderated
    Thank you very much for the information but i already found this API some time ago so this problem is solved...Thank you again anyway.

    Irina