当前位置: 首页>>代码示例>>PHP>>正文


PHP imap_deletemailbox函数代码示例

本文整理汇总了PHP中imap_deletemailbox函数的典型用法代码示例。如果您正苦于以下问题:PHP imap_deletemailbox函数的具体用法?PHP imap_deletemailbox怎么用?PHP imap_deletemailbox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了imap_deletemailbox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteAccount

 function deleteAccount($_hookValues)
 {
     $username = $_hookValues['account_lid'];
     $imapAdminUsername = $this->profileData['imapAdminUsername'];
     $imapAdminPW = $this->profileData['imapAdminPW'];
     if ($mbox = @imap_open($this->getMailboxString(), $imapAdminUsername, $imapAdminPW)) {
         $mailBoxName = "user.{$username}";
         // give the admin account the rights to delete this mailbox
         if (imap_setacl($mbox, $mailBoxName, $imapAdminUsername, "lrswipcda")) {
             if (imap_deletemailbox($mbox, imap_utf7_encode("{" . $this->profileData['imapServer'] . "}{$mailBoxName}"))) {
                 return true;
             } else {
                 // not able to delete mailbox
                 return false;
             }
         } else {
             // not able to set acl
             return false;
         }
     } else {
         // imap open failed
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:24,代码来源:class.cyrusimap.inc.php

示例2: deleteMailbox

 /**
  * Wrapper for imap_deletemailbox().
  * @param $mailbox
  * @return bool
  */
 public function deleteMailbox($mailbox)
 {
     return imap_deletemailbox($this->connection->getConnection(), $mailbox);
 }
开发者ID:craigh411,项目名称:ImapMailManager,代码行数:9,代码来源:ImapHandler.php

示例3: imap_deletemailbox

 function imap_deletemailbox($_folderName)
 {
     $mailboxString = ExecMethod('emailadmin.bo.getMailboxString', $_folderName, 3, $this->profileID);
     @imap_unsubscribe($this->mbox, $mailboxString);
     $result = imap_deletemailbox($this->mbox, $mailboxString);
     #print imap_last_error();
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:class.bofelamimail.inc.php

示例4: mailbox_delete

 /**
  * mailbox_delete()
  *  Delete a mailbox from the server.
  */
 function mailbox_delete($mailbox)
 {
     if ($this->connection == 0) {
         return false;
     }
     if (!imap_deletemailbox($this->connection, "\\{{$this->server}:{$this->port}}{$mailbox}")) {
         if ($this->debug) {
             echo "We had problems deleting the mailbox: {$mailbox}<br>";
             echo implode("<br />\n", imap_errors());
         }
         return false;
     }
     return true;
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:18,代码来源:mail.php

示例5: deletemailbox

 public function deletemailbox($folder)
 {
     return imap_deletemailbox($this->imapStream, $this->getAccountVar('cnx') . $folder);
 }
开发者ID:micoli,项目名称:qd_mail,代码行数:4,代码来源:imapProxy.php

示例6: DeleteFolder

 /**
  * Deletes a folder
  *
  * @param string        $id
  * @param string        $parent         is normally false
  *
  * @access public
  * @return boolean                      status - false if e.g. does not exist
  * @throws StatusException              could throw specific SYNC_FSSTATUS_* exceptions
  *
  */
 public function DeleteFolder($id, $parentid)
 {
     $imapid = $this->getImapIdFromFolderId($id);
     if ($imapid) {
         return imap_deletemailbox($this->mbox, $this->server . $imapid);
     }
     return false;
 }
开发者ID:peterbeck,项目名称:Z-Push-contrib,代码行数:19,代码来源:imap.php

示例7: deleteMailbox

 public function deleteMailbox(Mailbox $mailbox)
 {
     if (false === imap_deletemailbox($this->resource, $this->server . $mailbox->getName())) {
         throw new Exception('Mailbox ' . $mailbox->getName() . ' could not be deleted');
     }
     $this->mailboxes = $this->mailboxNames = null;
 }
开发者ID:Kofel,项目名称:imap,代码行数:7,代码来源:Connection.php

示例8: delete_mailbox

 /**
  * Delete a mailbox
  *
  * @param string $folder
  * @return bool
  * @access public
  */
 function delete_mailbox($folder)
 {
     if ($this->protocol == 'POP3') {
         $this->errors[] = GM_NO_POP3_SUPPORT;
         return false;
     }
     if ($this->use_native) {
         $mailbox = "\\{{$this->host}}INBOX.{$folder}";
         $res = imap_deletemailbox($this->mailer, $mailbox);
         if (!$res) {
             $this->errors[] = imap_last_error();
             return false;
         }
     } elseif ($this->protocol == 'IMAP') {
         $res = $this->mailer->deleteMailbox($folder);
         if ($res !== true) {
             return false;
         }
     }
     return true;
 }
开发者ID:huluwa,项目名称:zz_atmailopen,代码行数:28,代码来源:Generic_Mail.php

示例9: deleteMailbox

 public function deleteMailbox($mailbox)
 {
     return imap_deletemailbox($this->stream, $mailbox);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:4,代码来源:lib.php

示例10: createMailBox

function createMailBox($name, $id)
{
    $srv = getUsrMailData($id);
    $mbox = mail_login($srv["msrv"], $srv["port"], $srv["postf"], $srv["mailuser"], $srv["kennw"], $srv["proto"], $srv["ssl"]);
    $name1 = $name;
    $name2 = imap_utf7_encode($name);
    $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("{" . $srv["msrv"] . "}INBOX.{$newname}"))) {
        $status = @imap_status($mbox, "{" . $srv["msrv"] . "}INBOX.{$newname}", SA_ALL);
        if ($status) {
            print "your new mailbox '{$name1}' has the following status:<br>\n";
            print "Messages:   " . $status->messages . "<br>\n";
            print "Recent:     " . $status->recent . "<br>\n";
            print "Unseen:     " . $status->unseen . "<br>\n";
            print "UIDnext:    " . $status->uidnext . "<br>\n";
            print "UIDvalidity:" . $status->uidvalidity . "<br>\n";
            if (imap_renamemailbox($mbox, "{" . $srv["msrv"] . "}INBOX.{$newname}", "{your.imap.host}INBOX.{$name2}")) {
                echo "renamed new mailbox from '{$name1}' to '{$name2}'<br>\n";
                $newname = $name2;
            } else {
                print "imap_renamemailbox on new mailbox failed: " . imap_last_error() . "<br>\n";
            }
        } else {
            print "imap_status on new mailbox failed: " . imap_last_error() . "<br>\n";
        }
        if (@imap_deletemailbox($mbox, "{" . $srv["msrv"] . "}INBOX.{$newname}")) {
            print "new mailbox removed to restore initial state<br>\n";
        } else {
            print "imap_deletemailbox on new mailbox failed: " . implode("<br>\n", imap_errors()) . "<br>\n";
        }
    } else {
        print "could not create new mailbox: " . implode("<br>\n", imap_errors()) . "<br>\n";
    }
    imap_close($mbox);
}
开发者ID:vanloswang,项目名称:kivitendo-crm,代码行数:39,代码来源:crmLib.php

示例11: delete

 /**
  * Delete the specified folder.
  *
  * @param string $folder  The folder to delete.
  *
  * @return NULL
  */
 public function delete($folder)
 {
     $result = imap_deletemailbox($this->getBackend(), $this->_getBaseMbox() . $this->encodePath($folder));
     if (!$result) {
         throw new Horde_Kolab_Storage_Exception(sprintf(Horde_Kolab_Storage_Translation::t("Deleting folder %s failed.") . ' ' . Horde_Kolab_Storage_Translation::t("Error: %s"), $this->_getBaseMbox() . $folder, imap_last_error()));
     }
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:14,代码来源:Cclient.php

示例12: deletemailbox

 function deletemailbox($stream, $mailbox)
 {
     $this->folder_list_did_change();
     $mailbox = $this->utf7_encode($mailbox);
     return imap_deletemailbox($stream, $mailbox);
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:6,代码来源:class.mail_dcom_imap.inc.php

示例13: removeFolder

 /**
  * Remove a folder
  *
  * @param   string name
  * @return  void
  * @throws  peer.mail.MessagingException
  */
 public function removeFolder($name)
 {
     if (!imap_deletemailbox($this->_hdl[0], $this->_hdl[1] . $name)) {
         throw new \peer\mail\MessagingException('Deleting mailbox failed', $this->_errors());
     }
     $this->cache->remove(SKEY_FOLDER . $name);
 }
开发者ID:xp-framework,项目名称:mail,代码行数:14,代码来源:CclientStore.class.php

示例14: deleteMailbox

 /**
  * Deletes mailbox
  *
  * @param string $name
  * @throws DriverException
  */
 public function deleteMailbox($name)
 {
     if (!imap_deletemailbox($this->resource, $this->server . $name)) {
         throw new DriverException("Cannot delete mailbox '{$name}': " . imap_last_error());
     }
 }
开发者ID:jkuchar,项目名称:MailLibrary,代码行数:12,代码来源:ImapDriver.php

示例15: removeFolder

 /**
  * remove folder
  *
  * @return bool success or not
  * @param $name of the folder
  */
 public function removeFolder($name)
 {
     return imap_deletemailbox($this->imap, $this->mailbox . $name);
 }
开发者ID:radub,项目名称:php-imap-client,代码行数:10,代码来源:Imap.php


注:本文中的imap_deletemailbox函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。