drpp5680 2016-02-12 03:58 采纳率: 0%
浏览 135

PHP中的IMAP传入邮件服务器设置

I have searched and read so many questions regarding this. I am saving incoming emails in to a MySQL database. I am using pipe to script method and I have already set up those things and the file reads correctly when I receive an email.

The error I receive is:

$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to server: ' . imap_last_error());

I am confused with $hostname variable, I have tried many times and I failed.

Normally my server is localhost for MySQL. I tried with that, and my server uses SSL. I used this localhost:993/imap/ssl}INBOX, but none are working. What is the correct server for that variable?

imap.mydomain.org:993 ???

Please help me to resolve this problem. I am fed up with this.

  • 写回答

2条回答 默认 最新

  • duanhuang4306 2016-02-12 04:08
    关注

    Going by what you have said, have you tried:

    {localhost:993/imap/ssl}INBOX
    

    or

    {imap.mydomain.org:993/imap/ssl}INBOX
    

    If that doesn't work, could you try providing an error output?

    评论

报告相同问题?

悬赏问题

  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入