douyun3887 2015-07-29 17:45
浏览 84
已采纳

如何使用PHP从远程Lotus Notes 8.5.3服务器读取电子邮件

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.

  • 写回答

1条回答 默认 最新

  • dongxin9759 2015-07-29 20:32
    关注

    Domino Web Access Lite does not use POP3. It uses HTTP.

    Domino servers can support POP3, but it is not enabled by default and in most cases it probably remains disabled. You will have to talk to your Domino server's administrators in order to see if they are willing to enable it for you. You will probably need a very good reason in order to convince them to do this.

    If you are running PHP on a Wndows machine that has Lotus Notes or Domino installed, then you can access Domino data on your server using the Domino COM objects, which is described in this old article on IBM's web site.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?