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


PHP rcmail::console方法代码示例

本文整理汇总了PHP中rcmail::console方法的典型用法代码示例。如果您正苦于以下问题:PHP rcmail::console方法的具体用法?PHP rcmail::console怎么用?PHP rcmail::console使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rcmail的用法示例。


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

示例1: debug_log

 /**
  * Helper method to log debug msg if debug mode is enabled.
  */
 public static function debug_log($msg)
 {
     if (self::$debug === true) {
         rcmail::console(__CLASS__ . ': ' . $msg);
     }
 }
开发者ID:haision,项目名称:myroundcube,代码行数:9,代码来源:tasklist_caldav_driver.php

示例2: send_itip_message

 /**
  * Send an iTip mail message
  *
  * @param array   Event object to send
  * @param string  iTip method (REQUEST|REPLY|CANCEL)
  * @param array   Hash array with recipient data (name, email)
  * @param string  Mail subject
  * @param string  Mail body text label
  * @param object  Mail_mime object with message data
  * @param boolean Request RSVP
  * @return boolean True on success, false on failure
  */
 public function send_itip_message($event, $method, $recipient, $subject, $bodytext, $message = null, $rsvp = true)
 {
     if (!$this->sender['name']) {
         $this->sender['name'] = $this->sender['email'];
     }
     if (!$message) {
         libcalendaring::identify_recurrence_instance($event);
         $message = $this->compose_itip_message($event, $method, $rsvp);
     }
     $mailto = rcube_utils::idn_to_ascii($recipient['email']);
     $headers = $message->headers();
     $headers['To'] = format_email_recipient($mailto, $recipient['name']);
     $headers['Subject'] = $this->gettext(array('name' => $subject, 'vars' => array('title' => $event['title'], 'name' => $this->sender['name'])));
     // compose a list of all event attendees
     $attendees_list = array();
     foreach ((array) $event['attendees'] as $attendee) {
         $attendees_list[] = $attendee['name'] && $attendee['email'] ? $attendee['name'] . ' <' . $attendee['email'] . '>' : ($attendee['name'] ? $attendee['name'] : $attendee['email']);
     }
     $recurrence_info = '';
     if (!empty($event['recurrence_id'])) {
         $recurrence_info = "\n\n** " . $this->gettext($event['thisandfuture'] ? 'itipmessagefutureoccurrence' : 'itipmessagesingleoccurrence') . ' **';
     } else {
         if (!empty($event['recurrence'])) {
             $recurrence_info = sprintf("\n%s: %s", $this->gettext('recurring'), $this->lib->recurrence_text($event['recurrence']));
         }
     }
     $mailbody = $this->gettext(array('name' => $bodytext, 'vars' => array('title' => $event['title'], 'date' => $this->lib->event_date_text($event, true) . $recurrence_info, 'attendees' => join(",\n ", $attendees_list), 'sender' => $this->sender['name'], 'organizer' => $this->sender['name'])));
     // if (!empty($event['comment'])) {
     //     $mailbody .= "\n\n" . $this->gettext('itipsendercomment') . $event['comment'];
     // }
     // append links for direct invitation replies
     if ($method == 'REQUEST' && $rsvp && ($token = $this->store_invitation($event, $recipient['email']))) {
         $mailbody .= "\n\n" . $this->gettext(array('name' => 'invitationattendlinks', 'vars' => array('url' => $this->plugin->get_url(array('action' => 'attend', 't' => $token)))));
     } else {
         if ($method == 'CANCEL' && $event['cancelled']) {
             $this->cancel_itip_invitation($event);
         }
     }
     $message->headers($headers, true);
     $message->setTXTBody(rcube_mime::format_flowed($mailbody, 79));
     if ($this->rc->config->get('libcalendaring_itip_debug', false)) {
         rcmail::console('iTip ' . $method, $message->txtHeaders() . "\n\r" . $message->get());
     }
     // finally send the message
     $this->itip_send = true;
     $sent = $this->rc->deliver_message($message, $headers['X-Sender'], $mailto, $smtp_error);
     $this->itip_send = false;
     return $sent;
 }
开发者ID:claudineyqr,项目名称:Kolab-Roundcube-Libcalendaring,代码行数:61,代码来源:libcalendaring_itip.php


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