Welcome to WebmasterWorld Guest from 54.145.53.251

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)

New User

5+ Year Member

joined:May 3, 2006
posts:2
votes: 0


hi,

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

thanx

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

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0

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

New User

5+ Year Member

joined:May 3, 2006
posts:2
votes: 0


hi,

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

thanx

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

Preferred Member

10+ Year Member

joined:Sept 28, 2002
posts:505
votes: 0


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,
R.

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

Administrator

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

joined:July 24, 2001
posts:15755
votes: 0


Welcome to WebmasterWorld Z_scorp,

have you looked at this
[php.net...]

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 7, 2003
posts:1230
votes: 0


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]