imap_open(): Couldn't open stream for hostgator server {mail.mydomain.com:993/imap/ssl}INBOX in codeigniter

随声附和 提交于 2021-01-28 14:05:36

问题


I am working in codeigniter framework using imap library. I want to get all mails from my mail server into my web app. My code is working fine when i am using

imap_open("{imap.gmail.com:993/imap/ssl}INBOX", my_email, my_password);

but whenever I tried to get access of my hostgator mail server I got these type of errors.

1: imap_open(): Couldn't open stream {mail.mydomain.com:993/imap/ssl}INBOX

2: Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed. (errflg=1).

3: Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed. (errflg=2)

回答1:


According the HostGator Documentation you should provide (for secured imap):

  1. A username, your full email address
  2. Your password
  3. Your full server name
  4. Port: 993
  5. SSL: SSL/TLS

You should end up with something like

imap_open("{full.servername.com:993/imap/ssl/tls}", "my.email@servername.com","pwd");

You could also try the normal incoming mail settings which requires

  1. A username, your full email address
  2. Your password
  3. Your full server name
  4. Port: 143
  5. SSL: none

Resulting in:

imap_open("{full.servername.com:143}", "my.email@servername.com","pwd");


来源:https://stackoverflow.com/questions/65323660/imap-open-couldnt-open-stream-for-hostgator-server-mail-mydomain-com993-im

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!