Speed Test    Top 25 Hosts    Hosting Reviews    100 Hosts
GalaxyVisions - Ultimate Web Hosting Solutions

Dedicated servers
& web hosting directory

Advance Search    Dedicated Servers   Company Name   HostMatch
Thank you for visiting this site. If you are looking for web hosting services, you have come to the right place. Please search my database of over 2400 hosting companies.

If you need any help, please email me at terence @ hostpulse.com . I will personally try to reply your email within a day and give you some basic guidelines, negotiate with a few hosts to offer you good pricing or answer any hosting related problems that you may have. 
Cheap Web Hosting ASP & ASP.Net Hosting

Dedicated Server

Windows Server Hosting Ecommerce Hosting PHP Hosting
Linux & Unix Hosting Cold Fusion Hosting South America
Europe Reseller Hosting Managed Hosting
Virtual Private Server Asia Pacific Search by Country

Reference and Manual


Hosting Glossary  PHP  HTML 4.01  CSS 2.0  Core Javascript 1.5  XHTML 1.0

imap_createmailbox

imap_createmailbox

(PHP 3, PHP 4 , PHP 5)

imap_createmailbox -- Create a new mailbox

Description

bool imap_createmailbox ( resource imap_stream, string mbox)

imap_createmailbox() creates a new mailbox specified by mbox. Names containing international characters should be encoded by imap_utf7_encode()

Returns TRUE on success or FALSE on failure..

Example 1. imap_createmailbox() example

<?php
$mbox
= imap_open("{your.imap.host}", "username", "password", OP_HALFOPEN)
     or die(
"can't connect: " . imap_last_error());

$name1 = "phpnewbox";
$name2 = imap_utf7_encode("phpnewb&ouml;x");

$newname = $name1;

echo
"Newname will be '$name1'<br />\n";

// we will now create a new mailbox "phptestbox" in your inbox folder,
// check its status after creation and finaly remove it to restore
// your inbox to its initial state

if (@imap_createmailbox($mbox, imap_utf7_encode("{your.imap.host}INBOX.$newname"))) {
    
$status = @imap_status($mbox, "{your.imap.host}INBOX.$newname", SA_ALL);
    if (
$status) {
        echo
"your new mailbox '$name1' has the following status:<br />\n";
        echo
"Messages:   " . $status->messages    . "<br />\n";
        echo
"Recent:     " . $status->recent      . "<br />\n";
        echo
"Unseen:     " . $status->unseen      . "<br />\n";
        echo
"UIDnext:    " . $status->uidnext     . "<br />\n";
        echo
"UIDvalidity:" . $status->uidvalidity . "<br />\n";

        if (
imap_renamemailbox($mbox, "{your.imap.host}INBOX.$newname", "{your.imap.host}INBOX.$name2")) {
            echo
"renamed new mailbox from '$name1' to '$name2'<br />\n";
            
$newname = $name2;
        } else {
            echo
"imap_renamemailbox on new mailbox failed: " . imap_last_error() . "<br />\n";
        }
    } else {
        echo
"imap_status on new mailbox failed: " . imap_last_error() . "<br />\n";
    }
    
    if (@
imap_deletemailbox($mbox, "{your.imap.host}INBOX.$newname")) {
        echo
"new mailbox removed to restore initial state<br />\n";
    } else {
        echo
"imap_deletemailbox on new mailbox failed: " . implode("<br />\n", imap_errors()) . "<br />\n";
    }

} else {
    echo
"could not create new mailbox: " . implode("<br />\n", imap_errors()) . "<br />\n";
}

imap_close($mbox);
?>

See also imap_renamemailbox(), imap_deletemailbox() and imap_open() for the format of mbox names.

Web Hosting Showcase
View the web hosting showcase to find more relevant web hosting choice that will guide you in selecting a good web hosting company.
 

GalaxyVisions - Ultimate Web Hosting Solutions Cheap Web Hosting ASP & ASP.Net Hosting Dedicated Servers
Windows 2000 & 2003 Server Hosting Ecommerce Hosting PHP Hosting
Linux & Unix Hosting Cold Fusion Hosting South America
Europe Reseller Hosting Managed Hosting
Virtual Private Server Asia Pacific  

Web Hosting and Development Tools

Network Tools  Download Template  Programming Manuals  Developer Tools

  




Net Host Tools

Feature Host







This site provide free reviews of web hosting services from 100 selected companies. There are over 3000 over website hosting companies on the internet. Please research these domain hosting services carefully before you sign up with any. Read articles on web page hosting, web site hosting, domain names, website speed test, cheap web hosting services, PHP scripts, mysql database, asp hosting and virtual private server to gain a better knowledge on domain hosting and cheap web hosting.



Learn more about us
About HostPulse
Contact Us Terms of Use


©2011
All rights reserved.

Questions? Comments? Get started
Affordable Advertising | Host Login & Register
Submission
Submit a news |
Web Hosting and Development Tools
Network Tools  Download Template  Programming Manuals  Search by Country   Links to other sites