Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Check if folder exist before move Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
goofybnu
Newbie
Newbie
Avatar

Joined: 15 July 2013
Location: Brazil
Online Status: Offline
Posts: 3
Posted: 30 June 2014 at 10:40am | IP Logged Quote goofybnu

I'm try to create a copy of message when user click on not spam button, but i need to test if the destination folder exist before i copy the message.
I need this for training spam filter, the message will be copied to specific folder than i run an shell_exec command after copy.

I have added and if on the function MessageMove on file 'libraries/afterlogic/common/managers/mail/manager.php':

if(strtolower($sFromFolderFullNameRaw)=='spam' AND strtolower($sToFolderFullNameRaw)=='inbox'){
    // trainning command will be here
}
Back to Top View goofybnu's Profile Search for other posts by goofybnu Visit goofybnu's Homepage
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6087
Posted: 01 July 2014 at 1:55am | IP Logged Quote Igor

IMAP doesn't offer direct ways of checking whether the folder exists. Instead, you need to retrieve list of folders and look up required folder there. Mail manager offers Folders method which returns list of folders for specific account.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide