I am trying to read Lotus notes 8.5.3 emails from a remote server using PHP code.
It looked pretty straight when I read emails from Gmail using below code. But the same code did not connect to Lotus notes though the remote server supported POP3 on port 110 (I'm able to access emails on a web browser, I think that is the Web Access Lite mode)
<?php
class Email_reader {
// server connection
public $conn;
private $server = "{imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox";
private $user = 'xyz@gmail.com';
private $pass = '123';
function __construct() {
$this->connect();
}
function close() {
imap_close($this->conn);
}
function connect() {
try {
$this->conn = imap_open($this->server, $this->user, $this->pass) or die("Can't connect to:'$this->server': " . imap_last_error());
echo 'If you see this, we got IMAP working';
}
catch(Exception $e) {
echo 'error Message: ' .$e->getMessage();
}
}
}
$obj = new Email_reader();
echo "-------------------------00-------------------------";
$obj->close();
?>
I tried diff server url formats in the above code:
{server.com:110/pop3}INBOX
{server.com:110/pop3/novalidate-cert}INBOX
Can someone point me,
- if I'm missing something in the above code
- can I not access Lotus notes emails this way at all? Is so, what is the way to access them from PHP
- If not possible from PHP, I'm open to chose other programming languages, but it has to be from remote server (Linux)
- If there are good references/example code, that would be great
Thanks.