dpx49470 2010-10-27 02:21
浏览 206
已采纳

使用CURL阅读邮件? - PHP

Hello Is it possible to manipulate a dovcot server or any like server with CURL to return email for an email address?

I've been unsuccessful with imap_open and am in need of a new alternative.

I've been able to login using CURL but after that I do not know where to go. This is what is outputted after login:

+OK Dovecot ready. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Too many bad commands. 1+OK Dovecot ready. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Unknown command. -ERR Too many bad commands. 1

and this is the resource I'm using for study:

http://techhelp.santovec.us/pop3telnet.htm

-H

  • 写回答

1条回答 默认 最新

  • doutang1992 2010-10-27 19:15
    关注

    CURL's more for HTTP requests, though it will do some other protocols, like ftp. Most likely CURL's sending a suite of HTTP headers which dovecot won't understand. As well, without extra work, it'll close the connect after each request, forcing you to do the login sequence each time. You might be better off using sockets instead. Those won't send anything that you don't want sent, and will stay open for the life of the script.

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

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型