Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

imap delete function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php imap delete () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 3, PHP 4 , PHP 5)

imap_delete --  Mark a message for deletion from current mailbox

Syntax

bool imap_delete ( int imap_stream, int msg_number [, int options] )

Returns TRUE.

imap_delete() marks messages listed in msg_number for deletion. The optional flags parameter only has a single option, FT_UID, which tells the function to treat the msg_number argument as a UID. Messages marked for deletion will stay in the mailbox until either imap_expunge() is called or imap_close() is called with the optional parameter CL_EXPUNGE.

Note: POP3 mailboxes do not have their message flags saved between connections, so imap_expunge() must be called during the same connection in order for messages marked for deletion to actually be purged.

Example 1. imap_delete() example

<?php

$mbox
= imap_open("{your.imap.host}INBOX", "username", "password")
    or die(
"Can't connect: " . imap_last_error());

$check = imap_mailboxmsginfo($mbox);
echo
"Messages before delete: " . $check->Nmsgs . "<br />\n";

imap_delete($mbox, 1);

$check = imap_mailboxmsginfo($mbox);
echo
"Messages after  delete: " . $check->Nmsgs . "<br />\n";

imap_expunge($mbox);

$check = imap_mailboxmsginfo($mbox);
echo
"Messages after expunge: " . $check->Nmsgs . "<br />\n";

imap_close($mbox);
?>

See also: imap_undelete(), imap_expunge(), and imap_close().

Php imap delete Function syntax tag

imap delete php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php imap delete syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online