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

PHP imap_fetch_overview函数代码示例

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

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



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

示例1: createFromImap

 /**
  * Method to read email from imap extension and return Zend Mail Message object.
  *
  * This is bridge while migrating to Zend Mail package supporting reading from imap extension functions.
  *
  * @param resource $mbox
  * @param integer $num
  * @param array $info connection information about connection
  * @return ImapMessage
  */
 public static function createFromImap($mbox, $num, $info)
 {
     // check if the current message was already seen
     list($overview) = imap_fetch_overview($mbox, $num);
     $headers = imap_fetchheader($mbox, $num);
     $content = imap_body($mbox, $num);
     // fill with "\Seen", "\Deleted", "\Answered", ... etc
     $knownFlags = array('recent' => Zend\Mail\Storage::FLAG_RECENT, 'flagged' => Zend\Mail\Storage::FLAG_FLAGGED, 'answered' => Zend\Mail\Storage::FLAG_ANSWERED, 'deleted' => Zend\Mail\Storage::FLAG_DELETED, 'seen' => Zend\Mail\Storage::FLAG_SEEN, 'draft' => Zend\Mail\Storage::FLAG_DRAFT);
     $flags = array();
     foreach ($knownFlags as $flag => $value) {
         if ($overview->{$flag}) {
             $flags[] = $value;
         }
     }
     $message = new self(array('root' => true, 'headers' => $headers, 'content' => $content, 'flags' => $flags));
     // set MailDate to $message object, as it's not available in message headers, only in IMAP itself
     // this likely "message received date"
     $imapheaders = imap_headerinfo($mbox, $num);
     $header = new GenericHeader('X-IMAP-UnixDate', $imapheaders->udate);
     $message->getHeaders()->addHeader($header);
     $message->mbox = $mbox;
     $message->num = $num;
     $message->info = $info;
     return $message;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:35,代码来源:ImapMessage.php


示例2: fetch

 public function fetch($delete = false)
 {
     $oImap = imap_open('{' . $this->mail_server . ':993/imap/ssl/notls/novalidate-cert}', $this->username, $this->password);
     $oMailboxStatus = imap_check($oImap);
     $aMessages = imap_fetch_overview($oImap, "1:{$oMailboxStatus->Nmsgs}");
     $validMessages = array();
     foreach ($aMessages as $oMessage) {
         print "Trying message '" . $oMessage->subject . "'";
         $fileContent = $fileType = '';
         $geocoder = factory::create('geocoder');
         $postCode = $geocoder->extract_postcode($oMessage->subject);
         $fromName = null;
         $fromEmail = null;
         if (strpos($oMessage->from, '<')) {
             $split = split('<', $oMessage->from);
             //name - make sure name not an email address
             $fromName = trim($split[0]);
             if (valid_email($fromName)) {
                 $fromName = null;
             }
             //email
             $fromEmail = trim(str_replace('>', '', $split[1]));
         } else {
             $fromEmail = $oMessage->from;
         }
         $images = array();
         $messageStructure = imap_fetchstructure($oImap, $oMessage->msgno);
         if (isset($messageStructure->parts)) {
             $partNumber = 0;
             foreach ($messageStructure->parts as $oPart) {
                 $partNumber++;
                 if ($oPart->subtype == 'PLAIN' && !$postCode) {
                     $messageContent = imap_fetchbody($oImap, $oMessage->msgno, $partNumber);
                     if ($oPart->encoding == 4) {
                         $messageContent = quoted_printable_decode($messageContent);
                     }
                     $postCode = geocoder::extract_postcode($messageContent);
                 } elseif ($oPart->encoding == 3 && in_array($oPart->subtype, array('JPEG', 'PNG'))) {
                     $oImage = null;
                     $encodedBody = imap_fetchbody($oImap, $oMessage->msgno, $partNumber);
                     $fileContent = base64_decode($encodedBody);
                     $oImage = imagecreatefromstring($fileContent);
                     if (imagesx($oImage) > $this->min_import_size && imagesy($oImage) > $this->min_import_size) {
                         array_push($images, $oImage);
                     }
                     $fileType = strtolower($oPart->subtype);
                 }
             }
         }
         //add to the messages array
         array_push($validMessages, array('postcode' => $postCode, 'images' => $images, 'file_type' => $fileType, 'from_address' => $fromAddress, 'from_email' => $fromEmail, 'from_name' => $fromName));
         if ($delete) {
             imap_delete($oImap, $oMessage->msgno);
         }
     }
     imap_close($oImap, CL_EXPUNGE);
     $this->messages = $validMessages;
 }
开发者ID:schlos,项目名称:electionleaflets,代码行数:58,代码来源:mail_image.php


示例3: getdata

 function getdata($host, $login, $password, $savedirpath)
 {
     $mbox = imap_open($host, $login, $password) or die("can't connect: " . imap_last_error());
     $message = array();
     $message["attachment"]["type"][0] = "text";
     $message["attachment"]["type"][1] = "multipart";
     $message["attachment"]["type"][2] = "message";
     $message["attachment"]["type"][3] = "application";
     $message["attachment"]["type"][4] = "audio";
     $message["attachment"]["type"][5] = "image";
     $message["attachment"]["type"][6] = "video";
     $message["attachment"]["type"][7] = "other";
     $buzon_destino = "cfdi";
     echo imap_createmailbox($mbox, imap_utf7_encode("{$buzon_destino}"));
     echo imap_num_msg($mbox);
     for ($jk = 1; $jk <= imap_num_msg($mbox); $jk++) {
         $structure = imap_fetchstructure($mbox, $jk);
         $parts = $structure->parts;
         $fpos = 2;
         for ($i = 1; $i < count($parts); $i++) {
             $message["pid"][$i] = $i;
             $part = $parts[$i];
             if (strtolower($part->disposition) == "attachment") {
                 $message["type"][$i] = $message["attachment"]["type"][$part->type] . "/" . strtolower($part->subtype);
                 $message["subtype"][$i] = strtolower($part->subtype);
                 $ext = $part->subtype;
                 $params = $part->dparameters;
                 $filename = $part->dparameters[0]->value;
                 if (!($ext == 'xml' or $ext == 'XML' or $ext == 'PDF' or $ext == 'pdf')) {
                     continue;
                 }
                 $mege = "";
                 $data = "";
                 $mege = imap_fetchbody($mbox, $jk, $fpos);
                 $data = $this->getdecodevalue($mege, $part->type);
                 $fp = fopen($filename, 'w');
                 fputs($fp, $data);
                 fclose($fp);
                 $fpos += 1;
                 /* Se mueve el archiv descargado al directorio de recibidos */
                 //                    rename($filename, $savedirpath.$filename);
                 //                    printf("\nSe movio el archivo $filename");
             }
         }
         $result = imap_fetch_overview($mbox, $jk);
         echo $result[0]->from;
         //            imap_mail_move($mbox, $jk, $buzon_destino);
         //imap_delete tags a message for deletion
         //    imap_delete($mbox,$jk);
     }
     // imap_expunge deletes all tagged messages
     //                    imap_expunge($mbox);
     imap_close($mbox);
 }
开发者ID:njmube,项目名称:CSDOCSCFDI,代码行数:54,代码来源:CorreoGetAdjuntos.class.php


示例4: inbox

 function inbox()
 {
     $this->msg_cnt = imap_num_msg($this->conn);
     echo "Number of emails read = " . $this->msg_cnt . "\n";
     /*$in = array();
     		for($i = 1; $i <= $this->msg_cnt; $i++) {
     			$in[] = array(
     				'index'     => $i,
     				'header'    => imap_headerinfo($this->conn, $i),
     				'body'      => imap_body($this->conn, $i),
     				'structure' => imap_fetchstructure($this->conn, $i)
     			); */
     $output = '<table>';
     $output .= '<tr><th>Subject</th><th>voucher</th><th>From</th><th>seen</th><th>type</th></tr>';
     $mails = imap_search($this->conn, 'FROM "[email protected]" SUBJECT "Confirm Hotel Booking"');
     //print_r($mails);
     for ($i = 0; $i <= sizeof($mails); $i++) {
         $header = imap_fetch_overview($this->conn, $mails[$i], 0);
         $body = imap_fetchbody($this->conn, $mails[$i], 1.1);
         $output .= '<tr>';
         $output .= '<td><span class="subject">' . $header[0]->subject . '</span> </td>';
         $output .= '<td><span class="from">' . $header[0]->from . '</span></td>';
         $output .= '<td><span class="voucher">' . $mails[0]->voucher . '</span></td>';
         $output .= '<td><span class="date">' . $header[0]->date . '</span></td>>';
         $output .= '<td><span class="toggler">' . ($header[0]->seen ? 'read' : 'unread') . '"></span></td>';
         $structure = imap_fetchstructure($this->conn, $mails[$i]);
         $output .= '<td><span class="type">' . $structure->type . '</span> </td>';
         $output .= '</tr>';
     }
     $output .= '</table>';
     echo $output . "\n";
 }
开发者ID:jyotsnabuddha,项目名称:vistaram,代码行数:32,代码来源:Email_reader.php


示例5: listNew

 public function listNew($user_id, $filter)
 {
     $inbox = $this->getInbox($user_id);
     if ($filter == '') {
         $filter = 'UNSEEN';
     } else {
         $filter = 'UNSEEN CC "t' . $filter . '@' . $this->domain . '"';
     }
     $emails = imap_search($inbox, $filter);
     $msgs = array();
     $ids = array();
     for ($start = count($emails); $start > 0;) {
         $start--;
         $ids[] = $emails[$start];
     }
     $overviews = imap_fetch_overview($inbox, implode(',', $ids));
     foreach ($overviews as $overview) {
         $msg_no = $overview->msgno;
         $message = isset($overview->subject) ? $overview->subject : imap_fetchbody($inbox, $msg_no, '1');
         $from = $overview->from;
         if (($pos = strpos($from, '<')) !== FALSE) {
             $sender_name = substr($from, 0, $pos);
             $pos2 = strpos($from, '@', $pos);
             $sender_id = substr($from, $pos + 2, $pos2 - $pos - 2);
         }
         $msgs[] = array('id' => $msg_no, 'sender_id' => $sender_id, 'sender_name' => $sender_name, 'date' => $overview->udate, 'msg' => json_decode($message), 'seen' => $overview->seen);
     }
     $unreads = imap_search($inbox, "UNSEEN");
     if ($unreads) {
         imap_setflag_full($inbox, implode(',', $unreads), '\\Seen');
     }
     return $msgs;
 }
开发者ID:giangnh264,项目名称:mobileplus,代码行数:33,代码来源:EmailBasedNotify.php


示例6: GetIMAPContent

 /**
  * Gets IMAP content
  *
  * @param string $imapHost
  * @param string $imapUser
  * @param string $imapPassword
  * @param \Swiftriver\Core\ObjectModel\Channel $channel
  *
  * @return $contentItems[]
  */
 private function GetIMAPContent($imapHost, $imapUser, $imapPassword, $channel)
 {
     $imapResource = imap_open("{" . $imapHost . "}INBOX", $imapUser, $imapPassword);
     //Open up unseen messages
     $imapEmails = imap_search($imapResource, strtoupper($channel->subType));
     $contentItems = array();
     if ($imapEmails) {
         //Put newest emails on top
         rsort($imapEmails);
         foreach ($imapEmails as $Email) {
             //Loop through each email and return the content
             $email_overview = imap_fetch_overview($imapResource, $Email, 0);
             $email_message = imap_fetchbody($imapResource, $Email, 2);
             $source_name = $imapUser;
             $source = \Swiftriver\Core\ObjectModel\ObjectFactories\SourceFactory::CreateSourceFromIdentifier($source_name);
             $source->name = $source_name;
             $source->parent = $channel->id;
             $source->type = $channel->type;
             $source->subType = $channel->subType;
             $item = \Swiftriver\Core\ObjectModel\ObjectFactories\ContentFactory::CreateContent($source);
             $item->text[] = new \Swiftriver\Core\ObjectModel\LanguageSpecificText(null, $email_overview[0]->subject, array($email_message));
             //the message
             $item->link = null;
             $item->date = $email_overview[0]->date;
             $contentItems[] = $item;
         }
         imap_close($imapResource);
         return $contentItems;
     }
     imap_close($imapResource);
     return null;
 }
开发者ID:Bridgeborn,项目名称:Swiftriver,代码行数:42,代码来源:IMAPParser.php


示例7: getImportSets

 public function getImportSets($dataSourceSpec)
 {
     $connection = $this->getConnection($dataSourceSpec);
     if ($connection == false) {
         return DAL_POP3_RET_ERR_START . wfMsg('smw_ti_pop3error') . DAL_POP3_RET_ERR_END;
     }
     $check = imap_check($connection);
     $messages = imap_fetch_overview($connection, "1:{$check->Nmsgs}", 0);
     $result = "";
     $names = array();
     foreach ($messages as $msg) {
         if (key_exists("from", $msg)) {
             $name = $msg->from;
             $startPos = strpos($name, "<") + 1;
             $endPos = strpos($name, ">") - $startPos;
             $names[substr($name, $startPos, $endPos)] = true;
         }
     }
     foreach ($names as $name => $dontCare) {
         $result .= '<importSet>' . "\n" . '	<name>' . $name . '</name>' . "\n" . '</importSet>' . "\n";
     }
     imap_close($connection);
     $this->connection = false;
     return '<?xml version="1.0"?>' . "\n" . '<ImportSets xmlns="http://www.ontoprise.de/smwplus#">' . "\n" . $result . '</ImportSets>' . "\n";
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:25,代码来源:SMW_DALReadPOP3.php


示例8: GetIMAPContent

 /**
  * Gets IMAP content
  *
  * @param string $imapHost
  * @param string $imapUser
  * @param string $imapPassword
  * @param \Swiftriver\Core\ObjectModel\Channel $channel
  *
  * @return $contentItems[]
  */
 private function GetIMAPContent($imapHost, $imapUser, $imapPassword, $channel)
 {
     $imapResource = imap_open("{" . $imapHost . "}INBOX", $imapUser, $imapPassword);
     //Open up unseen messages
     $search = $channel->lastSuccess == null ? "UNSEEN" : "UNSEEN SINCE " . \date("Y-m-d", $channel->lastSuccess);
     $imapEmails = imap_search($imapResource, $search);
     $contentItems = array();
     if ($imapEmails) {
         //Put newest emails on top
         rsort($imapEmails);
         foreach ($imapEmails as $Email) {
             //Loop through each email and return the content
             $email_overview = imap_fetch_overview($imapResource, $Email, 0);
             if (strtotime(reset($email_overview)->date) < $channel->lastSuccess) {
                 continue;
             }
             $email_header_info = imap_header($imapResource, $Email);
             $email_message = imap_fetchbody($imapResource, $Email, 1);
             $source_name = \reset($email_overview)->from;
             $source = \Swiftriver\Core\ObjectModel\ObjectFactories\SourceFactory::CreateSourceFromIdentifier($source_name);
             $source->name = $source_name;
             $source->parent = $channel->id;
             $source->type = $channel->type;
             $source->subType = $channel->subType;
             $item = \Swiftriver\Core\ObjectModel\ObjectFactories\ContentFactory::CreateContent($source);
             $item->text[] = new \Swiftriver\Core\ObjectModel\LanguageSpecificText(null, $email_overview[0]->subject, array($email_message));
             //the message
             $item->link = null;
             $item->date = $email_header_info->udate;
             $contentItems[] = $item;
         }
     }
     imap_close($imapResource);
     return $contentItems;
 }
开发者ID:Bridgeborn,项目名称:Swiftriver,代码行数:45,代码来源:IMAPParser.php


示例9: inside_cutoffdate

function inside_cutoffdate($cutoffdate, $id, $mbox)
{
    printf("Checking if the messages is withing the cutoffdate %d, %s", $cutoffdate, $id);
    $is_inside = false;
    if ($cutoffdate == 0) {
        // No cutoffdate, all the messages are in range
        $is_inside = true;
        printf("No cutoffdate, all the messages are in range");
    } else {
        $overview = imap_fetch_overview($mbox, $id, FT_UID);
        if (is_array($overview)) {
            if (isset($overview[0]->date)) {
                $epoch_sent = strtotime($overview[0]->date);
                $is_inside = $cutoffdate <= $epoch_sent;
            } else {
                // No sent date defined, that's a buggy message but we will think that the message is in range
                $is_inside = true;
                printf("No sent date defined, that's a buggy message but we will think that the message is in range");
            }
        } else {
            // No overview, maybe the message is no longer there
            $is_inside = false;
            printf("No overview, maybe the message is no longer there");
        }
    }
    return $is_inside;
}
开发者ID:alanturing1,项目名称:Z-Push-contrib,代码行数:27,代码来源:testing-imap_date.php


示例10: check

 public function check($touch = false)
 {
     $mbox = $this->connection();
     #echo "<h1>Nachrichten in INBOX</h1><div style=\"overflow:auto;max-height:400px;\"><pre>";
     $MC = imap_check($mbox);
     $T = new HTMLTable(1, $touch ? "Mails" : "");
     $T->setTableStyle("font-size:11px;");
     $T->useForSelection();
     $start = $MC->Nmsgs - 10;
     if ($start < 1) {
         $start = 1;
     }
     $result = imap_fetch_overview($mbox, "{$start}:{$MC->Nmsgs}", 0);
     $result = array_reverse($result);
     foreach ($result as $overview) {
         #print_r($overview);
         $T->addRow(array("\n\t\t\t\t<small style=\"color:grey;float:right;\">" . Util::CLDateParser($overview->udate) . "</small>\n\t\t\t\t" . str_replace("\"", "", $this->decodeBlubb($overview->from)) . "<br />\n\t\t\t\t<small style=\"color:grey;\">" . substr($this->decodeBlubb($overview->subject), 0, 50) . "</small>"));
         $T->addCellEvent(1, "click", "\$j('#MailFrame').attr('src', './interface/rme.php?class=MailCheck&constructor=" . $this->getID() . "&method=showMailBody&parameters=\\'{$overview->uid}\\'');");
     }
     imap_close($mbox);
     #echo "</pre></div>";
     $BC = "";
     if ($touch) {
         $BC = new Button("Fenster\nschließen", "stop");
         $BC->style("float:right;margin:10px;");
         $BC->onclick(OnEvent::closePopup("MailCheck"));
     }
     echo "<div style=\"float:right;width:300px;\">";
     echo $BC;
     echo "<p>{$MC->Nmsgs} Nachricht" . ($MC->Nmsgs == 1 ? "" : "en") . "</p><div style=\"clear:both;\"></div>";
     echo $T;
     echo "</div>";
     echo "\n\t\t\t<div style=\"border-right-style:solid;border-right-width:1px;width:699px;\" class=\"borderColor1\">\n\t\t\t\t<iframe id=\"MailFrame\" style=\"border:0px;width:699px;height:520px;\" src=\"./fheME/MailCheck/Home/index.html\"></iframe>\n\t\t\t</div>";
     echo "<div style=\"clear:both;\"></div>";
 }
开发者ID:nemiah,项目名称:fheME,代码行数:35,代码来源:MailCheckGUI.class.php


示例11: pop3_list

function pop3_list($connection, $message = "")
{
    if (!isset($result)) {
        $result = array();
    }
    if ($message) {
        $range = $message;
    } else {
        $MC = @imap_check($connection);
        if ($MC) {
            $range = "1:" . $MC->Nmsgs;
        } else {
            $range = "1:0";
        }
    }
    $response = @imap_fetch_overview($connection, $range);
    if ($response) {
        $result = array();
        foreach ($response as $msg) {
            $result[$msg->msgno] = (array) $msg;
        }
    } else {
        $result = array();
    }
    return $result;
}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:26,代码来源:lethe.boxConnector.php


示例12: getInbox

 public function getInbox($page = 1, $perPage = 25, $sort = null)
 {
     if (!$this->isConnect) {
         return false;
     }
     $start = $page == 1 ? 0 : $page * $perPage - ($perPage - 1);
     $order = 0;
     $by = SORTDATE;
     if (is_array($sort)) {
         $order = $this->sortBy['order'][$sort[0]];
         $by = $this->sortBy['by'][$sort[1]];
     }
     $sorted = imap_sort($this->stream, $by, $order);
     $mails = array_chunk($sorted, $perPage);
     $mails = $mails[$page - 1];
     $mbox = imap_check($this->stream);
     $inbox = imap_fetch_overview($this->stream, implode($mails, ','), 0);
     if (!is_array($inbox)) {
         return false;
     }
     if (is_array($inbox)) {
         $temp_inbox = [];
         foreach ($inbox as $msg) {
             $temp_inbox[$msg->msgno] = $msg;
         }
         foreach ($mails as $msgno) {
             $this->inbox[$msgno] = $temp_inbox[$msgno];
         }
     }
     return $this->inbox;
 }
开发者ID:nahidz,项目名称:imapx,代码行数:31,代码来源:Imapx.php


示例13: getMails

 private function getMails()
 {
     $mails = array();
     if ($this->createConnection()) {
         $unseen = imap_search($this->connection, 'UNSEEN');
         // fetch only unseen mails... much faster
         $index = '';
         if ($unseen) {
             foreach ($unseen as $uMail) {
                 $index .= $uMail . ",";
             }
         }
         $mails = array_reverse(imap_fetch_overview($this->connection, "{$index}"));
     }
     $this->closeConnection();
     $cleanMails = array();
     foreach ($mails as $mail) {
         $tmp = array();
         $tmp['subject'] = $this->decodeSubject($mail->subject);
         $tmp['from'] = $this->decodeSubject($mail->from);
         $datetime = new DateTime($mail->date);
         $tmp['datetime'] = $datetime->getTimestamp() + $datetime->getOffset();
         $cleanMails[] = $tmp;
     }
     return $cleanMails;
 }
开发者ID:arnovr,项目名称:dashboard,代码行数:26,代码来源:mailcontroller.php


示例14: fetch

 public function fetch(MailCriteria $criteria, $callback)
 {
     $mailbox = @imap_open('{' . $this->host . ':' . $this->port . '}INBOX', $this->username, $this->password);
     if (!$mailbox) {
         throw new ImapException("Cannot connect to imap server: {$this->host}:{$this->port}'");
     }
     $this->checkProcessedFolder($mailbox);
     $emails = $this->fetchEmails($mailbox, $criteria);
     if ($emails) {
         foreach ($emails as $emailIndex) {
             $overview = imap_fetch_overview($mailbox, $emailIndex, 0);
             $message = imap_body($mailbox, $emailIndex);
             $email = new Email($overview, $message);
             $processed = $callback($email);
             if ($processed) {
                 $res = imap_mail_move($mailbox, $emailIndex, $this->processedFolder);
                 if (!$res) {
                     throw new \Exception("Unexpected error: Cannot move email to ");
                     break;
                 }
             }
         }
     }
     @imap_close($mailbox);
 }
开发者ID:martinstrycek,项目名称:imap-mail-downloader,代码行数:25,代码来源:Downloader.php


示例15: get_overviews

 function get_overviews($msg_number)
 {
     if (isset($this->overviews[$msg_number])) {
         return $this->overviews[$msg_number];
     }
     $this->overviews[$msg_number] = imap_fetch_overview($this->imap, $msg_number);
     return $this->overviews[$msg_number];
 }
开发者ID:asaquzzaman,项目名称:email-attachment-to-dropbox,代码行数:8,代码来源:attachment-list.php


示例16: fetch_overview

 public function fetch_overview($email_number = '0', $options = '0')
 {
     debug::output("Fetching Overview...");
     $overview = imap_fetch_overview($this->imap, $email_number, $options);
     if (empty($overview)) {
         throw new emailException(imap_last_error($this->imap), imap_errors($this->imap));
     } else {
         return $overview;
     }
 }
开发者ID:Git-Host,项目名称:sms,代码行数:10,代码来源:imap.class.php


示例17: update

 public function update()
 {
     if (isset($this->feed)) {
         $this->infoUpdate = imap_check($this->feed);
         if (!$this->infoUpdate) {
             throw new Exception('Error on update', 20003);
         }
         $this->postsOverview = imap_fetch_overview($this->feed, "1:{$this->infoUpdate->Nmsgs}", 0);
     }
 }
开发者ID:Tixp,项目名称:aaron,代码行数:10,代码来源:mailfeed.php


示例18: loadOverviewList

 function loadOverviewList($start, $end)
 {
     if ($this->mbox) {
         if ($end == 0) {
             $end = 1;
         }
         $mailOverviews = @imap_fetch_overview($this->mbox, "{$start}:{$end}", 0);
         $this->mailList['headers'] = array();
         $this->mailList['overview'] = $mailOverviews;
     }
 }
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:11,代码来源:MailBox.php


示例19: CheckMail

function CheckMail()
{
    echo "===========================\n";
    echo " CHECK MAIL\n";
    echo "===========================\n";
    global $rawDIR, $nowGradeFile, $now;
    // 	$outFile=fopen($nowGradeFile,"w");
    $hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
    $username = "{$emailMine}";
    $password = 'WRONG_PASS';
    /* try to connect */
    $inbox = imap_open($hostname, $username, $password) or die('Cannot connect to Gmail: ' . imap_last_error());
    /* grab emails */
    // 	$emails = imap_search($inbox, 'ALL', '[email protected]');
    $emails = imap_search($inbox, 'FROM [email protected]');
    /* if emails are returned, cycle through each... */
    if ($emails) {
        /* begin output var */
        $output = '';
        /* put the newest emails on top */
        // 		rsort($emails);
        /* for every email... */
        foreach ($emails as $email_number) {
            /* get information specific to this email */
            $overview = imap_fetch_overview($inbox, $email_number, 0);
            // 			if ( $overview[0]->from == "[email protected]" && $overview[0]->seen == 0 ) {
            // 			if ( $overview[0]->from == "[email protected]" ) {
            $output .= "Number: {$email_number}\n";
            $output .= "From: " . $overview[0]->from . "\n";
            $output .= "Subject: " . $overview[0]->subject . "\n";
            $output .= "Seen: " . $overview[0]->seen . "\n";
            $output .= "Date: " . $overview[0]->date . "\n";
            $message = imap_fetchbody($inbox, $email_number, 1);
            // 				$message = imap_body($inbox, $email_number, 'FT_PEEK');
            // 				echo "MESSAGE: ". $message;
            $outFile = fopen($nowGradeFile, "w");
            fwrite($outFile, $message);
            fclose($outFile);
            if (file_exists($nowGradeFile)) {
                echo "Wrote {$nowGradeFile}.\n";
            } else {
                echo "Failed to write {$nowGradeFile}.\n";
            }
            // 				imap_setflag_full($inbox, $email_number, 'unseen');
            // 				imap_mail_move($inbox, "$email_number", 'School');
            // 				break;
            // 			}
        }
    }
    /* close the connection */
    imap_close($inbox);
    echo "{$output}\n";
    exit;
}
开发者ID:mpalermo73,项目名称:scripts-git,代码行数:54,代码来源:Grades.php


示例20: overview

 function overview($message = false)
 {
     if ($message) {
         $range = $message;
     } else {
         if (!$this->stats) {
             $this->stats();
         }
         $range = "1:" . $this->stats->Nmsgs;
     }
     $this->overview = imap_fetch_overview($this->connection, $range);
 }
开发者ID:jmahmood,项目名称:MixiPOP3,代码行数:12,代码来源:pop3.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP imap_fetchbody函数代码示例发布时间:2022-05-15
下一篇:
PHP imap_expunge函数代码示例发布时间: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