6 * Setup of the mailfetch plugin.
8 * @copyright 1999-2009 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @subpackage mail_fetch
16 * Initialize the plugin
18 function squirrelmail_plugin_init_mail_fetch() {
19 global $squirrelmail_plugin_hooks;
21 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['mail_fetch'] = 'mail_fetch_link';
22 $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
23 $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
24 $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
25 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
29 * display link in menu line
32 function mail_fetch_link() {
33 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
34 return mail_fetch_link_do();
38 * Fetch pop3 mails on login.
41 function mail_fetch_login() {
42 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
43 mail_fetch_login_function();
47 * Adds preference that is used to detect new logins
50 function mail_fetch_setnew() {
51 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
52 mail_fetch_setnew_function();
56 * Add plugin option block
59 function mailfetch_optpage_register_block() {
60 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
61 mailfetch_optpage_register_block_function();
65 * Update mail_fetch settings when folders are renamed or deleted.
66 * @since 1.5.1 and 1.4.5
69 function mail_fetch_folderact($args) {
70 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
71 mail_fetch_folderact_function($args);