Source for file functions.php
Documentation is available at functions.php
** mail_fetch/functions.php
** Copyright (c) 1999-2006 The SquirrelMail Project Team
** Licensed under the GNU GPL. For full terms see the file COPYING.
** Functions for the mailfetch plugin.
** $Id: functions.php,v 1.5.2.5 2006/02/03 22:27:52 jervfors Exp $
/** declare plugin globals */
global $mail_fetch_allow_unsubscribed;
* Controls use of unsubscribed folders in plugin
* @global boolean $mail_fetch_allow_unsubscribed
$mail_fetch_allow_unsubscribed =
false;
for( $i=
0; $i <
$len; $i +=
2 ) {
if( !isset
( $MF_TIT ) ) {
$MF_TIT =
"MailFetch Secure for SquirrelMail 1.x";
$encrypt_key =
md5( $MF_TIT );
for( $i =
0; $i <
strlen( $txt ); $i++
) {
if( $ctr ==
strlen( $encrypt_key ) ) $ctr=
0;
$tmp.=
substr( $txt, $i, 1 ) ^
substr( $encrypt_key, $ctr, 1 );
$encrypt_key =
md5( rand( 0, 32000 ) );
for( $i =
0; $i <
strlen( $txt ); $i++
) {
if ($ctr==
strlen($encrypt_key)) $ctr=
0;
$tmp.=
substr($encrypt_key,$ctr,1) .
for ( $i=
0; $i <
strlen( $txt ); $i++
) {
$tmp.=
( substr( $txt, $i, 1 ) ^
$md5 );
* @param stream $imap_stream imap connection resource
* @param string $imap_folder imap folder name
* @return boolean true, when folder can be used to store messages.
// check if folder is subscribed or only exists.
// make sure that folder can store messages
* Checks if folder is noselect (can't store messages)
* Function does not check if folder subscribed.
* @param stream $imap_stream imap connection resource
* @param string $imap_folder imap folder name
* @return boolean true, when folder has noselect flag. false in any other case.
foreach($boxes as $box) {
if ($box['unformatted']==
$imap_folder) {
Documentation generated on Sat, 07 Oct 2006 16:31:24 +0300 by phpDocumentor 1.3.0RC6