I've written a PHP bulletin board. On the same server I've setup
squirrelmail and created email accounts for people with the same
login/passwords as their bulletin board accounts.
Currently this means they can just press a link and it launches
Squirrelmail, logging them in automatically.
What I would like to do is have the bulletin board check their squirrel
mail account when it's refreshed and to embed the number of new mails they
have on the board.
My code so far looks like:
======================
define('SM_PATH','squirrelmail/');
/* SquirrelMail required files. */
require_once(SM_PATH . 'config/config.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/imap_general.php');
$imap = sqimap_login($emaillogin, $emailpassword,
$imapServerAddress, $imapPort, 0);
$status = sqimap_status_messages($imap, 'INBOX');
$check = $status['UNSEEN'];
sqimap_logout($imap);
echo $check;
======================
The variables $emaillogin and $emailpassword are correct, but I get the
following error (occurs from line were $imap is set):
======================
ERROR:
Bad request: Missing or invalid argument to LOGIN
Read data:
======================
I'm reasonably sure this code is very incorrect and is probably
overcomplicating a relatively simple task. Anybody have any pointers as to
how this might be better implemented?
James
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users