• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP imap_deletemailbox函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: delete_mailbox

 function delete_mailbox($arr)
 {
     $namebox = $arr['del_past'];
     $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer'];
     $mbox_stream = $this->mbox ? $this->mbox : $this->open_mbox();
     //$del_folder = imap_deletemailbox($mbox_stream,"{".$imap_server."}INBOX.$namebox");
     $result = "Ok";
     $namebox = mb_convert_encoding($namebox, "UTF7-IMAP", "UTF-8");
     if (!imap_deletemailbox($mbox_stream, "{" . $imap_server . "}{$namebox}")) {
         $result = imap_last_error();
     }
     /*
     if($mbox_stream)
     	imap_close($mbox_stream);
     */
     Logger::info('expressomail', 'deldir', $namebox);
     return $result;
 }
开发者ID:cjvaz,项目名称:expressomail,代码行数:18,代码来源:class.imap_functions.inc.php


示例17: deleteFolder

 /**
  * Deletes the specified folder
  * @param string $mbox "::" delimited IMAP mailbox path, ie, INBOX.saved.stuff
  * @return bool
  */
 function deleteFolder($mbox)
 {
     $connectString = $this->getConnectString('', $mbox);
     //Remove Folder cache
     global $sugar_config;
     unlink("{$sugar_config['cache_dir']}modules/Emails/{$this->id}/folders/folders.php");
     if (imap_unsubscribe($this->conn, imap_utf7_encode($connectString))) {
         if (imap_deletemailbox($this->conn, $connectString)) {
             $this->mailbox = str_replace("," . $mbox, "", $this->mailbox);
             $this->save();
             $sessionFoldersString = $this->getSessionInboundFoldersString($this->server_url, $this->email_user, $this->port, $this->protocol);
             $sessionFoldersString = str_replace("," . $mbox, "", $sessionFoldersString);
             $this->setSessionInboundFoldersString($this->server_url, $this->email_user, $this->port, $this->protocol, $sessionFoldersString);
             return true;
         } else {
             echo "NOOP: could not delete folder: {$connectString}";
             $GLOBALS['log']->error("*** ERROR: EMAIL2.0 - could not delete IMAP mailbox with path: [ {$connectString} ]");
             return false;
         }
     } else {
         echo "NOOP: could not unsubscribe from folder, {$connectString} before deletion.";
         $GLOBALS['log']->error("*** ERROR: EMAIL2.0 - could not unsubscribe from folder, {$connectString} before deletion.");
     }
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:29,代码来源:InboundEmail.php


示例18: deleteFolder

 /**
  * Deletes the specified folder
  * @param string $mbox "::" delimited IMAP mailbox path, ie, INBOX.saved.stuff
  * @return bool
  */
 public function deleteFolder($mbox)
 {
     $returnArray = array();
     if ($this->getCacheCount($mbox) > 0) {
         $returnArray['status'] = false;
         $returnArray['errorMessage'] = "Can not delete {$mbox} as it has emails.";
     } else {
         $connectString = $this->getConnectString('', $mbox);
         //Remove Folder cache
         unlink("{$this->EmailCachePath}/{$this->id}/folders/folders.php");
         if (imap_unsubscribe($this->conn, imap_utf7_encode($connectString))) {
             if (imap_deletemailbox($this->conn, $connectString)) {
                 $this->mailbox = str_replace("," . $mbox, "", $this->mailbox);
                 $this->save();
                 $sessionFoldersString = $this->getSessionInboundFoldersString($this->server_url, $this->email_user, $this->port, $this->protocol);
                 $sessionFoldersString = str_replace("," . $mbox, "", $sessionFoldersString);
                 $this->setSessionInboundFoldersString($this->server_url, $this->email_user, $this->port, $this->protocol, $sessionFoldersString);
                 $returnArray['status'] = true;
             } else {
                 $GLOBALS['log']->error("*** ERROR: EMAIL2.0 - could not delete IMAP mailbox with path: [ {$connectString} ]");
                 $returnArray['status'] = false;
                 $returnArray['errorMessage'] = 'ERR_DELETE_FOLDER';
             }
         } else {
             $GLOBALS['log']->error("*** ERROR: EMAIL2.0 - could not unsubscribe from folder, {$connectString} before deletion.");
             $returnArray['status'] = false;
             $returnArray['errorMessage'] = 'ERR_UNSUBSCRIBE_FROM_FOLDER';
         }
     }
     if (strlen($returnArray['errorMessage']) > 0) {
         $returnArray['errorMessage'] = translate($returnArray['errorMessage'], $this->module_name);
     }
     return $returnArray;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:39,代码来源:InboundEmail.php


示例19: deleteMailBox

 /**
  * Deletes the given mailbox.
  *
  * @param $mailbox
  *
  * @return bool
  */
 public function deleteMailBox($mailbox)
 {
     return imap_deletemailbox($this->getImapStream(), $this->getServerSpecification() . $mailbox);
 }
开发者ID:kamaroly,项目名称:Fetch,代码行数:11,代码来源:Server.php


示例20: deleteMailbox

 public function deleteMailbox($mailbox)
 {
     imap_deletemailbox($this->mbox, imap_utf7_encode($mailbox));
 }
开发者ID:skrokbogumil,项目名称:KlientPoczty,代码行数:4,代码来源:mailService.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP imap_errors函数代码示例发布时间:2022-05-15
下一篇:
PHP imap_delete函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap