Sidebar

en:objects:mail:pop3:delete_message_by_number_via_pop3

delete_message_by_number_via_pop3

delete_message_by_number_via_pop3($number); - delete a message with the specified number via POP3

The function accepts parameters as input:

  • $number – message number (starts with 0)

    After testing, the function returns the result of its work to the script :
  • true – successfully deleted
  • true – deleted failed

    PHP example:

    <?php $xhe_host = "127.0.0.1:7018";
    //+ cef
    //connect the object to control the emulator, if not already connected
    if(!isset($path))
      $path = "../../../Templates/xweb_human_emulator.php";
    require($path);
     
    //Start
    echo "<hr> <font color = blue> webpage->".basename(__FILE__)."</font> <hr>";
     
    //2
    echo "2.Let's set the pop3 configuration:";
    echo $mail->pop3_connect("pop.mail.ru", 995, "arna.pervak", "msnijwdx")." n";
     
    //3
    echo "3.We will receive a letter from 0:";
    echo $mail->get_message_from_by_number_via_pop3(0)." n";
     
    //4
    echo "4.Get the subject 0 of the letter:";
    echo $mail->get_message_subject_by_number_via_pop3(0)." n";
     
    //five
    echo "5.Get date 0 of the letter:";
    echo $mail->get_message_date_by_number_via_pop3(0)." n";
     
    //6
    echo "6.Get the body 0 of the letter:";
    echo strlen($mail->get_message_body_by_number_via_pop3(0, false))." n";
     
    //7
    echo "7.Get the number of letters:";
    echo $mail->get_message_count_via_pop3()." n";
     
    //8
    echo "8.Delete 1 letter:";
    echo $mail->delete_message_by_number_via_pop3(2)." n";
     
    //nine
    echo "9.Get the number of letters:";
    echo $mail->get_message_count_via_pop3()." n";
     
    //ten
    echo "10.Delete all emails:";
    echo $mail->delete_all_messages_via_pop3(2)." n";
     
    //eleven
    echo "11 Get the number of emails:";
    echo $mail->get_message_count_via_pop3()." n";
     
    //end
    echo "<hr> <br>";
     
    //Quit
    $app->quit();
    ?>

    Python example:

     

    C# example:

     

    Java Script example:

     
  • en/objects/mail/pop3/delete_message_by_number_via_pop3.txt · Last modified: 2026/08/05 22:46 (external edit)