PDA

View Full Version : POP Mailserver



Splinter
04-06-2007, 11:56 AM
Ok basically im trying to retrieve my emails off the gmail server using the pop server. Any idea how the pop protocol is described??
Heres my current script:


<?php

$host = "pop.gmail.com";
$port = "995";

$ip = gethostbyname($host);

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

$result = socket_connect($socket, $ip, $port);

$in = "HEAD / POP\r\n";
$in .= "Host: pop.gmail.com\r\n";
$in .= "Connection: Close\r\n\r\n";
$out = '';

socket_write($socket, $in, strlen($in));

while ($out = socket_read($socket, 2048)) {
echo $out;
}

echo "Closing socket...";
socket_close($socket);
echo "OK.\n\n";

?>

Ini
04-06-2007, 12:13 PM
No idea but good luck.

Sygon..
04-06-2007, 02:12 PM
Ok basically im trying to retrieve my emails off the gmail server using the pop server. Any idea how the pop protocol is described??
Heres my current script:


<?php

$host = "pop.gmail.com";
$port = "995";

$ip = gethostbyname($host);

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

$result = socket_connect($socket, $ip, $port);

$in = "HEAD / POP\r\n";
$in .= "Host: pop.gmail.com\r\n";
$in .= "Connection: Close\r\n\r\n";
$out = '';

socket_write($socket, $in, strlen($in));

while ($out = socket_read($socket, 2048)) {
echo $out;
}

echo "Closing socket...";
socket_close($socket);
echo "OK.\n\n";

?>

I think you need the google API, im not sure though.

Want to hide these adverts? Register an account for free!