5 * Copyright (c) 1999-2005 The SquirrelMail Project Team
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 * Setup of the mailfetch plugin.
12 * @subpackage mail_fetch
16 if (! defined('SM_PATH')) define('SM_PATH','../../');
19 * Initialize the plugin
21 function squirrelmail_plugin_init_mail_fetch() {
22 global $squirrelmail_plugin_hooks;
24 $squirrelmail_plugin_hooks['menuline']['mail_fetch'] = 'mail_fetch_link';
25 $squirrelmail_plugin_hooks['loading_prefs']['mail_fetch'] = 'mail_fetch_load_pref';
26 $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
27 $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
28 $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
29 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
33 * display link in menu line
36 function mail_fetch_link() {
37 displayInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '');
45 function mail_fetch_load_pref() {
46 include_once(SM_PATH
. 'plugins/mail_fetch/functions.php');
47 mail_fetch_load_pref_function();
51 * Fetch pop3 mails on login.
54 function mail_fetch_login() {
55 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
56 mail_fetch_login_function();
60 * Adds preference that is used to detect new logins
63 function mail_fetch_setnew() {
64 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
65 mail_fetch_setnew_function();
69 * Add plugin option block
72 function mailfetch_optpage_register_block() {
73 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
74 mailfetch_optpage_register_block_function();
78 * Update mail_fetch settings when folders are renamed or deleted.
79 * @since 1.5.1 and 1.4.5
82 function mail_fetch_folderact($args) {
83 include_once (SM_PATH
. 'plugins/mail_fetch/functions.php');
84 mail_fetch_folderact_function($args);