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.

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

报告相同问题?

悬赏问题

  • ¥15 echarts动画效果失效的问题。官网下载的例子。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加