开发者

Use CURL to read mail? - 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 Unknow开发者_运维技巧n 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜