note 95959 added to function.imap-open
| From: | kay at rrr dot de | Date: | Sun, 31 Jan 2010 16:16:42 +0000 |
| Subject: | note 95959 added to function.imap-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165526@lists.php.net to get a copy of this message | ||
imap_open is very simple to use, but struggles a litte bit on setups with ssl and tls.
this are tested examples for different hosts and protocols.
uncomment the host/protocol line and fill in correct username and password.
Kay
<?php
#######
# 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}";
# $user="localuser";
# localhost nntp with and without ssl
# you have to specify an existing group, control.cancel should exist
# $authhost="{localhost:563/nntp/ssl/novalidate-cert}control.cancel";
# $authhost="{localhost:119/nntp/notls}control.cancel";
######
# web.de pop3 without ssl
# $authhost="{pop3.web.de:110/pop3/notls}";
# $user="kay.marquardt@web.de";
#########
# goggle with pop3 or imap
# $authhost="{pop.gmail.com:995/pop3/ssl/novalidate-cert}";
# $authhost="{imap.gmail.com:993/imap/ssl/novalidate-cert}";
# $user="username@gmail.com";
$user="username like above";
$pass="yourpass";
if ($mbox=imap_open( $authhost, $user, $pass ))
{
echo "<h1>Connected</h1>\n";
imap_close($mbox);
} else
{
echo "<h1>FAIL!</h1>\n";
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 94.219.48.152
----
Manual Page -- http://www.php.net/manual/en/function.imap-open.php
Edit -- https://master.php.net/note/edit/95959
Del: integrated -- https://master.php.net/note/delete/95959/integrated
Del: useless -- https://master.php.net/note/delete/95959/useless
Del: bad code -- https://master.php.net/note/delete/95959/bad+code
Del: spam -- https://master.php.net/note/delete/95959/spam
Del: non-english -- https://master.php.net/note/delete/95959/non-english
Del: in docs -- https://master.php.net/note/delete/95959/in+docs
Del: other reasons-- https://master.php.net/note/delete/95959
Reject -- https://master.php.net/note/reject/95959
Search -- https://master.php.net/manage/user-notes.php