Forum Moderators: coopster
The code : <snip>added below
My Web Host : Imhosted
PHP Ver : 4.3.2
Apache : 1.3.27
OS : Red Hat Linux
Has anyone else experienced anything similar to this, or know how to solve this? Any help would be greatly appreciative!
Thanks in advance!
if ($tsgmbox === false)
die ("Can't connect: " . imap_last_error() ."\n");
else
{
$check = imap_mailboxmsginfo($tsgmbox);
if($check->Unread!= 0)
{
$emailoutput = "<a href=\"http://webmail.site.com/\"><img src=\"img/logo/home_emailyes.gif\" width=\"50\" height=\"35\" border=\"0\" alt=\"\" /></a><br />";
if ($check->Unread == 1)
$emailtotal = "<b>{$check->Unread}</b> <font size=\"2\">New Message</font>";
else
$emailtotal = "<b>{$check->Unread}</b> <font size=\"2\">New Messages</font>";
}
else
$emailoutput = "<a href=\"http://webmail.site.com/\"><img src=\"img/logo/home_emailno.gif\" width=\"50\" height=\"35\" border=\"0\" alt=\"\" /></a><br />";
imap_close($tsgmbox);
}
[edited by: jatar_k at 4:47 pm (utc) on Aug. 22, 2003]
[edit reason] no urls thanks, code was short so I added it [/edit]
I ended up using a POP3 PEAR class [pear.php.net]. Note that it also needs the Net_Socket class.
It was a little inconvient compared to a predefined function, but once you get it going it works like a champ.