Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

retrieve mail in php

retrieving mail in php



4:13 am on May 3, 2006 (gmt 0)

5+ Year Member


can some plz tell me how to retrive mail in php.
if you could post me code that would be great.



6:47 am on May 3, 2006 (gmt 0)


7:10 am on May 3, 2006 (gmt 0)

5+ Year Member


i did not mean to send mail.
i mean how to retrive mail using php code.



11:55 am on May 3, 2006 (gmt 0)

10+ Year Member

First you should be clear about "where" you want to retrieve mail from, and what you will do with these mails. Are you talking about a web-mail interface?

You need a basic underlying mail infrastructure: an accessible POP3 or IMAP mail service, where your incoming mails had to be delivered to, before you can start to retrieve anything.

If you have a working IMAP on your server, then you may look at the web-mail product [squirrelmail.org...] , which is written in PHP.

It is an Open Source project, so you can have a look at their code to get an idea on how they do it.

Kind regards,


4:05 pm on May 3, 2006 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to WebmasterWorld Z_scorp,

have you looked at this


7:46 am on May 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Z_scorp, do you mean that your php script is executed when a mail arrives at a certain mail address?

this can be done via a pipe, checkout some related threads here:
Trying to pipe email to php script [webmasterworld.com]
Can PHP recieve emails? [webmasterworld.com]


Featured Threads

Hot Threads This Week

Hot Threads This Month