Hi,Based on the script found on the wiki, default folders are created if not exists with imp4. Here the script i use :
if (!function_exists('_imp_hook_postlogin')) {
function _imp_hook_postlogin($actionID, $isLogin)
{
global $prefs;
require_once '/usr/share/horde3/imp/lib/Folder.php';
$imp_folder = &IMP_Folder::singleton();
$folder_options = array(
'sent_mail_folder', 'drafts_folder', 'trash_folder', 'spam_folder'
);
foreach ($folder_options as $this_folder) {
$folder = $prefs->getValue($this_folder, true);
if ($folder) {
$folder = IMP::folderPref($folder, true);
if (!$imp_folder->exists($folder)) {
$imp_folder->create($folder, true);
}
}
}
}
}
I would like to do the same think with imp5, but i am lost with the
new Classes. Can you help me to migrate this script to imp5 ?
Thanks a lot. -- - Laurent Foucher < I U T 'A' Paul Sabatier > [email protected] Enseignant/Chargé de mission Systèmes & Réseau ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
binTl7nQhMDf0.bin
Description: Clé publique PGP
-- IMP mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
