POP3 mail to receive a sample _php tutorial

Source: Internet
Author: User
Test_pop3.php (as the current mainstream development language)



<title>Test for Manuel Lemoss PHP (as the current mainstream development language) POP3 class</title>


Require ("pop3.php (as current mainstream development language)");

$user = "User";
$password = "passwd";
$apop = 0;
$pop 3_connection=new Pop3_class;
$pop 3_connection->hostname= "mail.xiaocui.com";
if ($error = $pop 3_connection->open ()) = = "")
{
echo "
Connected to the POP3 server "$pop 3_connection->hostname".
";
if ($error = $pop 3_connection->login ($user, $password, $apop)) = = "")
{
echo "
User "$user" logged in.
";
if ($error = $pop 3_connection->statistics (& $messages,& $size) = = "")
{
echo "
$messages $size bytes.
";
$result = $pop 3_connection->listmessages ("", 0);
if (GetType ($result) = = = "Array")
{
For (Reset ($result), $message =0; $message echo "
Message ", Key ($result),"-", $result [Key ($result)]," bytes.
";
if ($messages >0)
{
if ($error = $pop 3_connection->retrievemessage (1,& $headers,& $body,-1)) = = "")
{
echo "
Message 1:---Message headers starts below---
";
for ($line =0; $line Echo "
", Htmlspecialchars ($headers [$line]), "
";
Echo
---Message headers ends above------message body starts below---
";
for ($line =0; $line Echo "
", Htmlspecialchars ($body [$line]), "
";

http://www.bkjia.com/phpjc/509051.html www.bkjia.com true http://www.bkjia.com/phpjc/509051.html techarticle test_pop3.php (as the current mainstream development language) HTML HEAD titletest for Manuel lemoss PHP ( As the current mainstream development language) POP3 Class/title/head BODY? Require ("pop3.php" as ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.