Is there simple email client script using PHP , IMAP?

Posted on 2011-10-04
Medium Priority
Last Modified: 2012-05-12
Can any one give some sample work around or script to display the emails from any email account. ? It is a email client like SquirrelMail or Horde .. but these looks big and more there... I need to display the mail with view more+see the attachment of any email ID or inbox.

Please help.

I referred this, but not much help ...simple mail
Question by:Loganathan Natarajan
LVL 11

Accepted Solution

maeltar earned 1500 total points
ID: 36910543
This works :

# localhost pop3 with and without ssl
# $authhost="{localhost:995/pop3/ssl/novalidate-cert}";
# $authhost="{localhost:110/pop3/notls}";

# localhost imap with and without ssl
# $authhost="{localhost:993/imap/ssl/novalidate-cert}";
# $authhost="{localhost:143/imap/notls}";

$mbox = imap_open($authhost, "<username>", "<password>");
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{<hostname>:143}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";


Open in new window

LVL 36

Author Closing Comment

by:Loganathan Natarajan
ID: 36916457

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question