Hi, I just have downloaded the freeware version of ArGoSoft Mail Server and installed it on my PC. I am now able to send mails to localhost using PHP mail() function and can see the mail with outlook express. But does anyone know how do I view the incoming mails with PHP programming? OR is there any pre-made script to handle this? Thanx for your support.
You can implement your own php script, but first you have to do a search and reading on the following protocol. IMAP (Internet Message Access Protocol) POP3 (Post Office Protocol version 3) These two protocols is the standard protocol to read mail in PHP.
If you are trying to send mail from windows with PHP using mail() function, you must first configure your php.ini file, and restart web server. For sending mails I prefer sending thru socket directly to SMTP server, because I have a better control over it. For checking (receiving) mails, you must understand how POP3 protocol works, or you can find some PHP class that do it for you. You can find most of them on PHP classes site. Regards, Ivan
Yes, and no. IMAP is just another protocol like POP3, but it's different from POP3. For reading mails you will need a client application that will connect to IMAP.
You can read your mail by using the following IMAP functions. What you need is the mail server and login details and use these function to do the work. imap_open() imap_close() imap_headers() imap_header() imap_fetchheader() imap_body() imap_delete() imap_xpunge()
I just gotta say, reading incoming mail is a pain in the ass. I started programming my own the other day and got pretty far, but in the end figured it wasn't worth it. I did stumble across a class on the rather hideous website, PHP Classes, that does everything you need. With a bit of tinkering, I think it'll work great for you: http://www.phpclasses.org/browse/package/2.html Hope that helps!