IMAP functions of PHP allow Communication with IMAP and POP3 Services trhough the PHP Enabled Webserver.
To use imap you must start your imap session using the imap_open() it is best to do this in a Variable so you dont leav an pen session.
we now have a Stream to a pop3 server running on localhost(The host of the script).Code:$mailbox = imap_open ("{localhost:110/pop3}INBOX", "user", "pass");
What if we want to read the stream.
Reading an IMAP stream is fairly simple as long as you know the basic pre-defined variables for doing so.
Why dont we check for some new email?
Ok then define a variable i will call $checker you name it what you want. Add the following code to your variable
Notice our mailbox has cropped up again the imap_check function will check using other variables linked to this.Code:$checker = imap_check($mailbox);
For example
Note that this is 100% Correct SyntaxCode:Total Number of Messages : <?= $checker->Nmsgs ?> Name of Mailbox : <?= $checker->mailbox ?>
Those are 2 basic examples of how to check the mailserver Here are a list of all the different Variable Types for imap_check()
Well this is the Basic IMAP check Function of PHP I will soon post a tutorial for IMAP headers also.Code:Date :: Get the Date of last received message Driver :: Show the Connection Type Mailbox :: Display Mailbox Name Nmsgs :: Total Messages Recent :: Number of recent messages
Thanks for reading,
Affix
Very nice tutorial. +rep
Thanks for your comments
I will write some more
+rep![]()
you can use this with a catchall address and create your own E-Mail Provider
Just thaught I would throw that in there
Thats why I learned to do it lol gave up on the project though was taking up too much time
Hmmm interesting. I never knew PHP had an area for this, really amazing. +rep
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
Yes.. I was finding this one.. was a bit confused how to do.. Thanks for sharing with us.. +rep from me too
_______________________
gadgets
women for tedisco
dude thats awesome!
Checkout my new forum! http://adminreference.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks