Hi am having problems,
I'm building a mail reader for a uni project I want to login with different email providers which I have got working locally I can login with an gmail, aol, aim email address and see my mail.
I cannot do this on my bluehost server as I could not make outbound connections so I bought a dedicated IP and I always get unable to get local issuer certificate error like:
I have spoken to bluehost about this its ongoing has been for days but as yet its not been resolved I was hoping someone knew what the problem is or how to fix it.Code:Certificate failure for imap.aol.com: /C=US/ST=Virginia/L=Dulles/O=America Online Inc./CN=AOL Member CA
This is the code I use to login to the mail account
I'd really appreciate some help as my project is on hold until I can find a fix for this.Code:function login($username, $password){ //get form data $username = trim($_POST['username']); $password = trim($_POST['password']); //strip all tags from varible $username = strip_tags($username); $password = strip_tags($password); if($username == '' || $password == ''){ global $errorMessage; $errorMessage = '<p><span class="warning">Please enter your email address and password!</span></p>'; } $arr = explode('@', $username); $host = trim(stripslashes($arr[1])); if (preg_match("/karoo/i", $host)) { $host = 'karoo.co.uk'; } if($host == 'hotmail.com' || $host == 'hotmail.co.uk' || $host == 'msn.com' || $host == 'live.com' || $host == 'lycos.com' || $host == 'lycos.co.uk'){ global $errorMessage; $errorMessage = '<p><span class="warning">Sorry Hotmail, msn, live, lycos users cannot use this service at this time.</span></p>'; } if(!$errorMessage) { switch($host){ case "nuttycoder.net": $host = '{mail.nuttycoder.net:143/notls/norsh}'; break; case "karoo.co.uk": $host = '{pop.karoo.co.uk:110/pop3}'; break; case "aol.com": $host = '{imap.aol.com:143/imap}'; break; case "aim.com": $host = '{imap.aol.com:143/imap}'; break; case "lycos.co.uk": $host = '{mail.lycos.co.uk:143/pop3}'; break; case "yahoo.com": $host = '{mail.yahoo.com:110/pop3}'; break; case "hotmail.com": $host = '{207.46.106.175:1863/imap}'; break; case "msn.com": $host = '{mail.pop3hot.com:143/imap}'; break; case "googlemail.com": $host = '{imap.gmail.com:993/imap/ssl}'; break; case "gmail.com": $host = '{imap.gmail.com:993/imap/ssl}'; break; default: $host = '{mail.'.$host.':143}'; } if(@imap_open($host, $username,$password)or die(imap_last_error())) { $_SESSION['ho'] = $host; $_SESSION['us'] = $username; $_SESSION['pa'] = $password; // reload the page header('Location: '.$_SERVER['HTTP_REFERER']); exit; } else { //make error message avalible outside of function global $errorMessage; // define an error message $errorMessage = '<p><span class="warning">Sorry you cannot login there is a problem: '.imap_last_error()."</span></p>\n"; } } }
you can test the sample application at http://webguideuk.com/amail


