Question : Retrieving email message count in PHP without storing password in cleartext

Hi,
I have a web based application (PHP/javascript) that is run on the same server as our pop/imap server. Currently, I have a call to get the number of email messages so that the user can tell if they have email or not. This works great, but I have to have their password to do the check using the code attached.

Of course, I need to have their email address and password to do the check. Being local, I'm not too worried about SSL, but that's always an option - but won't resolve the fact that I have to store their email password in cleartext. Should I use a crypt/decrypt for lack of anything better, or is there a way to check the local imap server without having the password?

I'm running this on CentOS Linux and use the default pop/imap services since they are easily installed and configured through cpanel and I can let the customer manage their own mailboxes.  I have a VPS reseller service and create individual cpanel accounts for my clients.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
$conn = @imap_open("{localhost:993/imap/ssl/novalidate-cert}", $email_addr, $email_pass,"n_retries=1");

$status = @imap_status($conn, "{localhost:993/imap/ssl/novalidate-cert}", SA_ALL);
 		if ($status) 
 		{
 			$total_emails = $status->messages;
 			$total_unseen = $status->unseen;
 		} 
 		@imap_close($conn);
	}

Answer : Retrieving email message count in PHP without storing password in cleartext

Try using a "system restore" (to find out how to do it for your operating system simply google "system restore" along with your operating system name).  Restore it to a point before you first installed the betas (note that any programs you might have installed prior to installing the betas, you may have to install again).

Having looked at the setup log provided, it looks like you tried to cancel it several times at the end - is this the case?
Random Solutions  
 
programming4us programming4us