Create Your Own Mail Script With PHP and IMAP
(Page 1 of 6 )
Thanks to PHP, we can check our email account remotely using PHP and its imap_xxx functions, which allow us to communicate with mail servers via IMAP, POP3 or NNTP protocols. In this article Mitchell shows us how to create a completely web-based email checking script which can also delete, send and reply to emails... all using only PHP's IMAP functions.How many times have you been away from your home PC and wished that you could check your IMAP/POP3 mail account? If you're anything like me then you're always on the move and your laptop is your best friend.
Thanks to PHP, we can check our email account remotely using PHP and its imap_xxx functions, which allow us to communicate with mail servers via IMAP (Internet Message Access Protocol), POP3 (Post Office Protocol) and/or NNTP (Network News Transfer Protocol).
In this article we're going to build a mail script that will accept an email account, password and optional IMAP port number. The script will then login to that mail account and display the users inbox in a similar fashion to the way Hotmail does: all using only PHP and HTML. From the inbox screen, we have the option to compose a new email, view our emails and even reply to them.
To test the source code and examples in this article you should be running either a Windows/Linux server with IIS/Apache and PHP 4+ installed. You should also have the IMAP libraries installed, which we will look at shortly.
Next: What is IMAP? >>
More PHP Articles
More By Mitchell Harper