/plugins/newmail/setup.php

Description

newmail.php

Copyright (c) 1999-2020 The SquirrelMail Project Team Copyright (c) 2000 by Michael Huttinger Licensed under the GNU GPL. For full terms see the file COPYING.

Quite a hack -- but my first attempt at a plugin. We were looking for a way to play a sound when there was unseen messages to look at. Nice for users who keep the squirrel mail window up for long periods of time and want to know when mail arrives.

Basically, I hacked much of left_main.php into a plugin that goes through each mail folder and increments a flag if there are unseen messages. If the final count of unseen folders is > 0, then we play a sound (using the HTML at the far end of this script).

This was tested with IE5.0 - but I hear Netscape works well, too (with a plugin).

Functions
CheckNewMailboxSound (line 41)

Checks if mailbox contains new messages.

  • return: true, if there are new messages
bool CheckNewMailboxSound (stream $imapConnection, string $mailbox, string $real_box, string $delimeter, string $unseen,  &$total_new, integer $total_new)
  • stream $imapConnection
  • string $mailbox: FIXME: option is not used
  • string $real_box: unformated mailbox name
  • string $delimeter: FIXME: option is not used
  • string $unseen: FIXME: option is not used
  • integer $total_new: number of new messages
  • &$total_new
newmail_optpage_register_block (line 83)
void newmail_optpage_register_block ()
newmail_plugin (line 164)
void newmail_plugin ()
newmail_pref (line 135)
void newmail_pref ()
newmail_sav (line 99)
void newmail_sav ()
newmail_set_loadinfo (line 157)

Set loadinfo data

Used by option page when saving settings.

void newmail_set_loadinfo ()
squirrelmail_plugin_init_newmail (line 73)
void squirrelmail_plugin_init_newmail ()

Documentation generated on Mon, 13 Jan 2020 04:25:18 +0100 by phpDocumentor 1.4.3