Hi,
I'm writing a web based email script. I can currently get it to access 1 account at a time, however some users might have more than 1 account. So I need to set up an array, but I'm not 100% sure now.
I need something like
$mailaccount[1]['host'] = 'mail.domain.com';
$mailaccount[1]['user'] = 'user1';
$mailaccount[1]['pass'] = 'password';
$mailaccount[1]['type'] = 'pop3';
$mailaccount[1]['port'] = '110';
$mailaccount[2]['host'] = 'mail.host.co.uk';
$mailaccount[2]['user'].....etc
How do I then access this infomation, so the program opens and checks each account? So far i'm using..
function check_mail(){
global $mailserv,$username,$password,$protocol,$portnum,$mailbox;
$imap = imap_open("{$mailserv/$protocol:$portnum}$mailbox", $username,$password);
$headers = imap_headers ($imap);....
But like i said, this access only 1 account. Can I put a while loop in somewhere, that will check all accounts?
Cheers
Ben