POP3
Moderator: General Moderators
Code: Select all
<?
// connecting to a pop3 /imap
$mail = imap_open('{mail.server.com:143}', ' username' , 'password' ); //imap
$mail = imap_open(' {mail.server.com/pop3}', ' username' , 'password'); //pop3
$headers = imap_headers($mail); // get mail headers
$last = imap_num_msg($mail);
$header = imap_header($mail, $last);
$body = imap_body($mail, $last); // grap body
imap_clode($mail); // closing connection
?>-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
<?php
$connection = fsockopen('pop3.server.de',110);
if($connection)
{
echo fgets($connection);
fputs($connection,'USER yourusername\r\n');
echo fgets($connection);
fputs($connection,'PASS yourpassword\r\n');
echo fgets($connection);
fputs(connection,'LIST\r\n');
echo fgets($connection);
fputs(connection,'QUIT\r\n');
echo fgets($connection);
fclose($connection);
}
?>
<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>!!!:
+OK WEB.DE POP3-Server
Fatal error: Maximum execution time of 30 seconds exceeded in D:\Programme\Apache Group\Apache2\htdocs\new.php on line 8
$connection = fsockopen('pop3.server.de',110);
if($connection)
{
echo fgets($connection);
fputs($connection,'USER yourusername\r\n');
echo fgets($connection);
fputs($connection,'PASS yourpassword\r\n');
echo fgets($connection);
fputs(connection,'LIST\r\n');
echo fgets($connection);
fputs(connection,'QUIT\r\n');
echo fgets($connection);
fclose($connection);
}
?>
<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>!!!:
+OK WEB.DE POP3-Server
Fatal error: Maximum execution time of 30 seconds exceeded in D:\Programme\Apache Group\Apache2\htdocs\new.php on line 8
did you build youre php with
#--with-imap or --with-imap-ssl and if with a self-made certificate add this aswell..
/novalidate-cert
###
Than try the following again..
#--with-imap or --with-imap-ssl and if with a self-made certificate add this aswell..
/novalidate-cert
###
Than try the following again..
Code: Select all
<?
// connecting to a pop3 /imap
// imap connection....
$mail = imap_open('{mail.server.com:143}', ' username' , 'password' );
// for pop3
$mail = imap_open(' {mail.server.com/pop3}', ' username' , 'password');
$headers = imap_headers($mail); // get mail headers
$last = imap_num_msg($mail);
$header = imap_header($mail, $last);
$body = imap_body($mail, $last); // grap body
imap_clode($mail); // closing connection
?>