String::setDefaultCharset(NLS::getCharset());
/* Set up the mail headers and read the log file. */
- $msg_headers = new Horde_MIME_Headers();
+ $msg_headers = new Horde_Mime_Headers();
$msg_headers->addReceivedHeader();
$msg_headers->addMessageIdHeader();
$msg_headers->addUserAgentHeader();
$msg_headers->addHeader('To', $mail_address_full);
$msg_headers->addHeader('Subject', _("Notification: Linked attachment downloaded"));
- $msg = new Horde_MIME_Message();
+ $msg = new Horde_Mime_Message();
$msg->setType('text/plain');
$msg->setCharset(NLS::getCharset());
$msg->setContents(String::wrap(sprintf(_("Your linked attachment has been downloaded by at least one user.\n\nAttachment name: %s\nAttachment date: %s\n\nClick on the following link to permanently delete the attachment:\n%s"), $file_name, date('r', $time_stamp), Util::addParameter(Horde::selfUrl(true, false, true), 'd', $id))));
Horde::logMessage($file_data, __FILE__, __LINE__, PEAR_LOG_ERR);
Horde::fatal(_("The specified file cannot be read."), $_self_url, __LINE__);
}
-$mime_type = Horde_MIME_Magic::analyzeData($file_data, isset($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null);
+$mime_type = Horde_Mime_Magic::analyzeData($file_data, isset($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null);
if ($mime_type === false) {
- $mime_type = Horde_MIME_Magic::filenameToMIME($file_name, false);
+ $mime_type = Horde_Mime_Magic::filenameToMIME($file_name, false);
}
// Prevent 'jar:' attacks on Firefox. See Ticket #5892.
$filenames = $imp_compose->deleteAttachment($deleteList);
if ($notify) {
foreach ($filenames as $val) {
- $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_MIME::decode($val)), 'horde.success');
+ $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_Mime::decode($val)), 'horde.success');
}
}
}
$header['to'] = $imp_headers->getValue('to');
}
if (empty($header['to'])) {
- ($header['to'] = Horde_MIME_Address::addrArray2String($imp_headers->getOb('from'))) ||
- ($header['to'] = Horde_MIME_Address::addrArray2String($imp_headers->getOb('reply-to')));
+ ($header['to'] = Horde_Mime_Address::addrArray2String($imp_headers->getOb('from'))) ||
+ ($header['to'] = Horde_Mime_Address::addrArray2String($imp_headers->getOb('reply-to')));
}
break;
foreach ($filelist as $val) {
$data = $registry->call('files/returnFromSelectlist', array($select_id, $i++));
if ($data && !is_a($data, 'PEAR_Error')) {
- $part = new Horde_MIME_Part();
+ $part = new Horde_Mime_Part();
$part->setContents($data);
$part->setName(reset($val));
$res = $imp_compose->addMIMEPartAttachment($part);
/* If this is the first page load for this compose item, add auto BCC
* addresses. */
if (!$reloaded && ($actionID != 'draft')) {
- $header['bcc'] = Horde_MIME_Address::addrArray2String($identity->getBccAddresses());
+ $header['bcc'] = Horde_Mime_Address::addrArray2String($identity->getBccAddresses());
}
foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
$identity->getValue('sig_first', $ident),
($smf_check) ? $smf : IMP::displayFolder($smf),
$identity->saveSentmail($ident),
- Horde_MIME_Address::addrArray2String($identity->getBccAddresses($ident))
+ Horde_Mime_Address::addrArray2String($identity->getBccAddresses($ident))
);
}
require_once 'Horde/Serialize.php';
$t->set('numberattach', $imp_compose->numberOfAttachments());
if ($t->get('numberattach')) {
require_once IMP_BASE . '/lib/MIME/Contents.php';
- $imp_contents = new IMP_Contents(new Horde_MIME_Message());
+ $imp_contents = new IMP_Contents(new Horde_Mime_Message());
$atc = array();
$disp_num = 0;
* The IMP_Compose:: class contains functions related to generating
* outgoing mail messages.
*
- * $Horde: imp/lib/Compose.php,v 1.401 2008/11/05 22:09:49 slusarz Exp $
+ * $Horde: imp/lib/Compose.php,v 1.402 2008/11/09 07:38:45 slusarz Exp $
*
* Copyright 2002-2008 The Horde Project (http://www.horde.org/)
*
*
* @param array $header List of message headers.
* @param mixed $message Either the message text (string) or a
- * Horde_MIME_Message object that contains the
+ * Horde_Mime_Message object that contains the
* text to send.
* @param string $charset The charset that was used for the headers.
* @param boolean $html Whether this is an HTML message.
*
* @param array $headers List of message headers.
* @param mixed $message Either the message text (string) or a
- * Horde_MIME_Message object that contains the
+ * Horde_Mime_Message object that contains the
* text to send.
* @param string $charset The charset that was used for the headers.
* @param boolean $html Whether this is an HTML message.
protected function _saveDraftMsg($headers, $message, $charset, $html,
$session)
{
- $mime = new Horde_MIME_Message();
+ $mime = new Horde_Mime_Message();
/* Set up the base message now. */
$body = $this->getMessageBody($message, $charset, $html, false, !$session);
$body = $mime->toString();
/* Initalize a header object for the draft. */
- $draft_headers = new Horde_MIME_Headers();
+ $draft_headers = new Horde_Mime_Headers();
$draft_headers->addHeader('Date', date('r'));
if (!empty($headers['from'])) {
- $draft_headers->addHeader('From', Horde_MIME::encode($headers['from'], $charset));
+ $draft_headers->addHeader('From', Horde_Mime::encode($headers['from'], $charset));
}
foreach (array('to' => 'To', 'cc' => 'Cc', 'bcc' => 'Bcc') as $k => $v) {
if (!empty($headers[$k])) {
$addr = $headers[$k];
if ($session) {
- $addr = Horde_MIME::encodeAddress($this->formatAddr($addr), $charset, $_SESSION['imp']['maildomain']);
+ $addr = Horde_Mime::encodeAddress($this->formatAddr($addr), $charset, $_SESSION['imp']['maildomain']);
if (is_a($addr, 'PEAR_Error')) {
return PEAR::raiseError(sprintf(_("Saving the draft failed. The %s header contains an invalid e-mail address: %s."), $k, $addr->getMessage()));
}
}
if (!empty($headers['subject'])) {
- $draft_headers->addHeader('Subject', Horde_MIME::encode($headers['subject'], $charset));
+ $draft_headers->addHeader('Subject', Horde_Mime::encode($headers['subject'], $charset));
}
if (isset($mime)) {
}
/* Get the message ID. */
- $headers = Horde_MIME_Headers::parseHeaders($data);
+ $headers = Horde_Mime_Headers::parseHeaders($data);
/* Add the message to the mailbox. */
try {
}
$header = array(
- 'to' => Horde_MIME_Address::addrArray2String($imp_headers->getOb('to')),
- 'cc' => Horde_MIME_Address::addrArray2String($imp_headers->getOb('cc')),
- 'bcc' => Horde_MIME_Address::addrArray2String($imp_headers->getOb('bcc')),
+ 'to' => Horde_Mime_Address::addrArray2String($imp_headers->getOb('to')),
+ 'cc' => Horde_Mime_Address::addrArray2String($imp_headers->getOb('cc')),
+ 'bcc' => Horde_Mime_Address::addrArray2String($imp_headers->getOb('bcc')),
'subject' => $imp_headers->getValue('subject')
);
* sent out.
* @param boolean $noattach Don't add attachment information.
*
- * @return Horde_MIME_Part The body as a MIME object, or PEAR_Error on
+ * @return Horde_Mime_Part The body as a MIME object, or PEAR_Error on
* error.
*/
public function getMessageBody($message, $charset, $html,
}
/* Set up the body part now. */
- $textBody = new Horde_MIME_Part('text/plain');
+ $textBody = new Horde_Mime_Part('text/plain');
$textBody->setContents($textBody->replaceEOL($message));
$textBody->setCharset($charset);
if ($trailer !== null) {
/* Determine whether or not to send a multipart/alternative
* message with an HTML part. */
if ($html) {
- $htmlBody = new Horde_MIME_Part('text/html', $message_html, null, 'inline');
+ $htmlBody = new Horde_Mime_Part('text/html', $message_html, null, 'inline');
if ($trailer !== null) {
$htmlBody->appendContents($this->text2html($trailer));
}
$htmlBody->setContents(String::convertCharset(tidy_get_output($tidy), 'UTF-8', $charset));
}
- $basepart = new Horde_MIME_Part('multipart/alternative');
+ $basepart = new Horde_Mime_Part('multipart/alternative');
$textBody->setDescription(String::convertCharset(_("Plaintext Version of Message"), NLS::getCharset(), $charset));
$basepart->addPart($textBody);
$htmlBody->setCharset($charset);
}
if ($this->_pgpAttachPubkey || $this->_attachVCard) {
- $new_body = new Horde_MIME_Part('multipart/mixed');
+ $new_body = new Horde_Mime_Part('multipart/mixed');
$new_body->addPart($body);
$new_body->addPart($imp_pgp->publicKeyMIMEPart());
if ($this->_pgpAttachPubkey) {
$body = $new_body;
}
} else {
- $body = new Horde_MIME_Part('multipart/mixed');
+ $body = new Horde_Mime_Part('multipart/mixed');
$body->addPart($basepart);
foreach ($this->getAttachments() as $part) {
/* Store the data inside the current part. */
}
}
} elseif ($this->_pgpAttachPubkey || $this->_attachVCard) {
- $body = new Horde_MIME_Part('multipart/mixed');
+ $body = new Horde_Mime_Part('multipart/mixed');
$body->addPart($basepart);
if ($this->_pgpAttachPubkey) {
$body->addPart($imp_pgp->publicKeyMIMEPart());
}
/* Initalize a header object for the outgoing message. */
- $msg_headers = new Horde_MIME_Headers();
+ $msg_headers = new Horde_Mime_Headers();
if (empty($opts['useragent'])) {
require_once IMP_BASE . '/lib/version.php';
$msg_headers->setUserAgent('Internet Messaging Program (IMP) ' . IMP_VERSION);
/* Add Return Receipt Headers. */
if (!empty($opts['readreceipt']) &&
$conf['compose']['allow_receipts']) {
- $mdn = new Horde_MIME_MDN();
+ $mdn = new Horde_Mime_MDN();
$mdn->addMDNRequestHeaders($msg_headers, $barefrom);
}
$i++;
$oldPart = $mime_message->getPart($i);
if ($oldPart !== false) {
- $replace_part = new Horde_MIME_Part('text/plain');
+ $replace_part = new Horde_Mime_Part('text/plain');
$replace_part->setCharset($charset);
$replace_part->setContents('[' . _("Attachment stripped: Original attachment type") . ': "' . $oldPart->getType() . '", ' . _("name") . ': "' . $oldPart->getName(true, true) . '"]', '8bit');
$mime_message->alterPart($i, $replace_part);
* @param IMP_Headers &$headers The IMP_Headers object holding this
* message's headers.
* @param mixed &$message Either the message text (string) or a
- * Horde_MIME_Message object that contains
+ * Horde_Mime_Message object that contains
* the text to send.
* @param string $charset The charset that was used for the headers.
*
global $conf;
/* Properly encode the addresses we're sending to. */
- $email = Horde_MIME::encodeAddress($email, null, $_SESSION['imp']['maildomain']);
+ $email = Horde_Mime::encodeAddress($email, null, $_SESSION['imp']['maildomain']);
if (is_a($email, 'PEAR_Error')) {
return $email;
}
/* Validate the recipient addresses. */
- $result = Horde_MIME_Address::parseAddressList($email, array('defserver' => $_SESSION['imp']['maildomain'], 'validate' => true));
+ $result = Horde_Mime_Address::parseAddressList($email, array('defserver' => $_SESSION['imp']['maildomain'], 'validate' => true));
if (empty($result)) {
return $result;
}
/* Add the site headers. */
$this->addSiteHeaders($headers);
- /* If $message is a string, we need to get a Horde_MIME_Message object
+ /* If $message is a string, we need to get a Horde_Mime_Message object
* to encode the headers. */
if (is_string($message)) {
- $mime_message = Horde_MIME_Message::parseMessage($message);
+ $mime_message = Horde_Mime_Message::parseMessage($message);
}
/* We don't actually want to alter the contents of the $conf['mailer']
* Adds any site-specific headers defined in config/header.php to the
* header object.
*
- * @param Horde_MIME_Headers $headers The Horde_MIME_Headers object.
+ * @param Horde_Mime_Headers $headers The Horde_Mime_Headers object.
*/
public function addSiteHeaders(&$headers)
{
return;
}
- $r_array = Horde_MIME::encodeAddress($recipients, null, $_SESSION['imp']['maildomain']);
+ $r_array = Horde_Mime::encodeAddress($recipients, null, $_SESSION['imp']['maildomain']);
if (!is_a($r_array, 'PEAR_Error')) {
- $r_array = Horde_MIME_Address::parseAddressList($r_array, array('validate' => true));
+ $r_array = Horde_Mime_Address::parseAddressList($r_array, array('validate' => true));
}
if (empty($r_array)) {
$notification->push(_("Could not save recipients."));
if (empty($name)) {
$name = $recipient->mailbox;
}
- $name = Horde_MIME::decode($name);
+ $name = Horde_Mime::decode($name);
$result = $registry->call('contacts/import', array(array('name' => $name, 'email' => $recipient->mailbox . '@' . $recipient->host),
'array', $abook));
continue;
}
- $arr = array_filter(array_map('trim', Horde_MIME_Address::explode($hdr[$key], ',;')));
+ $arr = array_filter(array_map('trim', Horde_Mime_Address::explode($hdr[$key], ',;')));
$tmp = array();
foreach ($arr as $email) {
continue;
}
- $obs = Horde_MIME_Address::parseAddressList($email);
+ $obs = Horde_Mime_Address::parseAddressList($email);
if (empty($obs)) {
return PEAR::raiseError(sprintf(_("Invalid e-mail address: %s."), $email));
}
if (isset($ob['groupname'])) {
$group_addresses = array();
foreach ($ob['addresses'] as $ad) {
- if (Horde_MIME::is8bit($ad['mailbox'])) {
+ if (Horde_Mime::is8bit($ad['mailbox'])) {
return PEAR::raiseError(sprintf(_("Invalid character in e-mail address: %s."), $email));
}
return PEAR::raiseError(_("Invalid hostname."));
} elseif (Util::extensionExists('idn')) {
$host = idn_to_ascii(String::convertCharset($host, NLS::getCharset(), 'UTF-8'));
- } elseif (Horde_MIME::is8bit($ad['mailbox'])) {
+ } elseif (Horde_Mime::is8bit($ad['mailbox'])) {
return PEAR::raiseError(sprintf(_("Invalid character in e-mail address: %s."), $email));
}
- $group_addresses[] = Horde_MIME_Address::writeAddress($ad['mailbox'], $host, isset($ad['personal']) ? $ad['personal'] : '');
+ $group_addresses[] = Horde_Mime_Address::writeAddress($ad['mailbox'], $host, isset($ad['personal']) ? $ad['personal'] : '');
}
// Add individual addresses to the recipient list.
$addrlist = array_merge($addrlist, $group_addresses);
- $tmp[] = Horde_MIME_Address::writeGroupAddress($ob['groupname'], $group_addresses) . ' ';
+ $tmp[] = Horde_Mime_Address::writeGroupAddress($ob['groupname'], $group_addresses) . ' ';
} else {
- if (Horde_MIME::is8bit($ob['mailbox'])) {
+ if (Horde_Mime::is8bit($ob['mailbox'])) {
return PEAR::raiseError(sprintf(_("Invalid character in e-mail address: %s."), $email));
}
return PEAR::raiseError(_("Invalid hostname."));
} elseif (Util::extensionExists('idn')) {
$host = idn_to_ascii(String::convertCharset($host, NLS::getCharset(), 'UTF-8'));
- } elseif (Horde_MIME::is8bit($ob['mailbox'])) {
+ } elseif (Horde_Mime::is8bit($ob['mailbox'])) {
return PEAR::raiseError(sprintf(_("Invalid character in e-mail address: %s."), $email));
}
- $addrlist[] = Horde_MIME::writeAddress($ob['mailbox'], $host, isset($ob['personal']) ? $ob['personal'] : '');
+ $addrlist[] = Horde_Mime::writeAddress($ob['mailbox'], $host, isset($ob['personal']) ? $ob['personal'] : '');
$tmp[] = end($addrlist) . ', ';
}
}
}
/**
- * Create the base Horde_MIME_Message for sending.
+ * Create the base Horde_Mime_Message for sending.
*
* @param array $to The recipient list.
* @param string $body Message body.
*/
protected function _createMimeMessage($to, $body, $encrypt, $from = null)
{
- $mime_message = new Horde_MIME_Message();
+ $mime_message = new Horde_Mime_Message();
$usePGP = ($GLOBALS['prefs']->getValue('use_pgp') &&
!empty($GLOBALS['conf']['utils']['gnupg']));
}
}
- /* Add data to Horde_MIME_Message object. */
+ /* Add data to Horde_Mime_Message object. */
$body->setMIMEId(0);
$mime_message->addPart($body);
if ($actionID == 'reply' || $actionID == '*') {
($header['to'] = $to) ||
- ($header['to'] = Horde_MIME_Address::addrArray2String($h->getOb('reply-to'))) ||
- ($header['to'] = Horde_MIME_Address::addrArray2String($h->getOb('from')));
+ ($header['to'] = Horde_Mime_Address::addrArray2String($h->getOb('reply-to'))) ||
+ ($header['to'] = Horde_Mime_Address::addrArray2String($h->getOb('from')));
if ($actionID == '*') {
$all_headers['reply'] = $header;
}
$to_arr = $h->getOb('reply-to');
$reply = '';
if (!empty($to_arr)) {
- $reply = Horde_MIME_Address::addrArray2String($to_arr);
+ $reply = Horde_Mime_Address::addrArray2String($to_arr);
} elseif (!empty($from_arr)) {
- $reply = Horde_MIME_Address::addrArray2String($from_arr);
+ $reply = Horde_Mime_Address::addrArray2String($from_arr);
}
- $header['to'] = Horde_MIME_Address::addrArray2String(array_merge($to_arr, $from_arr));
- $me[] = Horde_MIME_Address::bareAddress($header['to'], $_SESSION['imp']['maildomain']);
+ $header['to'] = Horde_Mime_Address::addrArray2String(array_merge($to_arr, $from_arr));
+ $me[] = Horde_Mime_Address::bareAddress($header['to'], $_SESSION['imp']['maildomain']);
/* Build the Cc: header. */
$cc_arr = $h->getOb('to');
if (!empty($cc_arr) &&
- ($reply != Horde_MIME_Address::addrArray2String($cc_arr))) {
+ ($reply != Horde_Mime_Address::addrArray2String($cc_arr))) {
$cc_arr = array_merge($cc_arr, $h->getOb('cc'));
} else {
$cc_arr = $h->getOb('cc');
}
- $header['cc'] = Horde_MIME_Address::addrArray2String($cc_arr, $me);
+ $header['cc'] = Horde_Mime_Address::addrArray2String($cc_arr, $me);
/* Build the Bcc: header. */
- $header['bcc'] = Horde_MIME_Address::addrArray2String($h->getOb('bcc') + $identity->getBccAddresses(), $me);
+ $header['bcc'] = Horde_Mime_Address::addrArray2String($h->getOb('bcc') + $identity->getBccAddresses(), $me);
if ($actionID == '*') {
$all_headers['reply_all'] = $header;
}
$header = $all_headers;
}
- $from = Horde_MIME_Address::addrArray2String($h->getOb('from'));
+ $from = Horde_Mime_Address::addrArray2String($h->getOb('from'));
if (empty($from)) {
$from = '<>';
}
foreach ($msgList as $folder => $indicesList) {
foreach ($indicesList as $val) {
++$attached;
- $part = new Horde_MIME_Part('message/rfc822');
+ $part = new Horde_Mime_Part('message/rfc822');
$contents = &IMP_Contents::singleton($val . IMP::IDX_SEP . $folder);
$digest_headers = $contents->getHeaderOb();
if (!($name = $digest_headers->getValue('subject'))) {
* to or forwarding) the given MIME message and the user's default
* settings.
*
- * @param Horde_MIME_Message $mime_message A MIME message object.
+ * @param Horde_Mime_Message $mime_message A MIME message object.
*
* @return string The charset to use.
*/
if (($date_ob = $h->getValue('date'))) {
$text .= _(" Date: ") . $date_ob . "\n";
}
- if (($from_ob = Horde_MIME_Address::addrArray2String($h->getOb('from')))) {
+ if (($from_ob = Horde_Mime_Address::addrArray2String($h->getOb('from')))) {
$text .= _(" From: ") . $from_ob . "\n";
}
- if (($rep_ob = Horde_MIME_Address::addrArray2String($h->getOb('reply-to')))) {
+ if (($rep_ob = Horde_Mime_Address::addrArray2String($h->getOb('reply-to')))) {
$text .= _("Reply-To: ") . $rep_ob . "\n";
}
if (($sub_ob = $h->getValue('subject'))) {
$text .= _(" Subject: ") . $sub_ob . "\n";
}
- if (($to_ob = Horde_MIME_Address::addrArray2String($h->getOb('to')))) {
+ if (($to_ob = Horde_Mime_Address::addrArray2String($h->getOb('to')))) {
$text .= _(" To: ") . $to_ob . "\n";
}
- if (($cc_ob = Horde_MIME_Address::addrArray2String($h->getOb('cc')))) {
+ if (($cc_ob = Horde_Mime_Address::addrArray2String($h->getOb('cc')))) {
$text .= _(" Cc: ") . $cc_ob . "\n";
}
}
/**
- * Adds an attachment to a Horde_MIME_Part from an uploaded file.
+ * Adds an attachment to a Horde_Mime_Part from an uploaded file.
* The actual attachment data is stored in a separate file - the
- * Horde_MIME_Part information entries 'temp_filename' and 'temp_filetype'
+ * Horde_Mime_Part information entries 'temp_filename' and 'temp_filetype'
* are set with this information.
*
* @param string $name The input field name from the form.
return PEAR::raiseError(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename), 'horde.error');
}
- /* Store the data in a Horde_MIME_Part. Some browsers do not send the
+ /* Store the data in a Horde_Mime_Part. Some browsers do not send the
* MIME type so try an educated guess. */
- $part = new Horde_MIME_Part();
+ $part = new Horde_Mime_Part();
if (!empty($_FILES[$name]['type']) &&
($_FILES[$name]['type'] != 'application/octet-stream')) {
$type = $_FILES[$name]['type'];
* do it in this order here because, most likely, if a browser
* can't identify the type of a file, it is because the file
* extension isn't available and/or recognized. */
- if (!($type = Horde_MIME_Magic::analyzeFile($tempfile, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
- $type = Horde_MIME_Magic::filenameToMIME($filename, false);
+ if (!($type = Horde_Mime_Magic::analyzeFile($tempfile, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
+ $type = Horde_Mime_Magic::filenameToMIME($filename, false);
}
}
$part->setType($type);
}
/**
- * Adds an attachment to a Horde_MIME_Part from data existing in the part.
+ * Adds an attachment to a Horde_Mime_Part from data existing in the part.
*
- * @param Horde_MIME_Part &$part The object that contains the attachment
+ * @param Horde_Mime_Part &$part The object that contains the attachment
* data.
*
* @return PEAR_Error Returns a PEAR_Error object on error.
/* Try to determine the MIME type from 1) the extension and
* then 2) analysis of the file (if available). */
if ($type == 'application/octet-stream') {
- $type = Horde_MIME_Magic::filenameToMIME($part->getName(true), false);
+ $type = Horde_Mime_Magic::filenameToMIME($part->getName(true), false);
}
- /* Extract the data from the currently existing Horde_MIME_Part and
+ /* Extract the data from the currently existing Horde_Mime_Part and
then delete it. If this is an unknown MIME part, we must save to a
temporary file to run the file analysis on it. */
if (!$vfs) {
}
if (($type == 'application/octet-stream') &&
- ($analyzetype = Horde_MIME_Magic::analyzeFile($attachment, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
+ ($analyzetype = Horde_Mime_Magic::analyzeFile($attachment, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
$type = $analyzetype;
}
} else {
$vfs_data = $part->getContents();
if (($type == 'application/octet-stream') &&
- ($analyzetype = Horde_MIME_Magic::analyzeData($vfs_data, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
+ ($analyzetype = Horde_Mime_Magic::analyzeData($vfs_data, !empty($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null))) {
$type = $analyzetype;
}
}
/**
* Stores the attachment data in its correct location.
*
- * @param Horde_MIME_Part &$part The Horde_MIME_Part of the attachment.
+ * @param Horde_Mime_Part &$part The Horde_Mime_Part of the attachment.
* @param string $data Either the filename of the attachment or, if
* $vfs_file is false, the attachment data.
* @param boolean $vfs_file If using VFS, is $data a filename?
foreach ($number as $val) {
$part = &$this->_cache[$val];
- if (!is_a($part, 'Horde_MIME_Part')) {
+ if (!is_a($part, 'Horde_Mime_Part')) {
continue;
}
$filename = $part->getInformation('temp_filename');
*
* @param integer $id The ID of the part to rebuild.
*
- * @return Horde_MIME_Part The Horde_MIME_Part with its contents.
+ * @return Horde_Mime_Part The Horde_Mime_Part with its contents.
*/
public function buildAttachment($id)
{
* Takes the temporary data for a single part and puts it into the
* contents of that part.
*
- * @param Horde_MIME_Part &$part The part to rebuild data into.
+ * @param Horde_Mime_Part &$part The part to rebuild data into.
*/
protected function _buildPartData(&$part)
{
/* First we'll get a comma seperated list of email addresses
and a comma seperated list of personal names out of $from
(there just might be more than one of each). */
- $addr_list = Horde_MIME_Address::parseAddressList($from);
+ $addr_list = Horde_Mime_Address::parseAddressList($from);
if (empty($addr_list)) {
$addr_list = array();
}
}
/**
- * Convert a text/html Horde_MIME_Part message with embedded image links
+ * Convert a text/html Horde_Mime_Part message with embedded image links
* to a multipart/related MIME_Part with the image data embedded in the
* part.
*
- * @param Horde_MIME_Part $mime_part The text/html object.
+ * @param Horde_Mime_Part $mime_part The text/html object.
*
- * @return Horde_MIME_Part The modified Horde_MIME_Part.
+ * @return Horde_Mime_Part The modified Horde_Mime_Part.
*/
public function convertToMultipartRelated($mime_part)
{
}
/* Scan for 'img' tags - specifically the 'src' parameter. If
- * none, return the original Horde_MIME_Part. */
+ * none, return the original Horde_Mime_Part. */
if (!preg_match_all('/<img[^>]+src\s*\=\s*([^\s]+)\s+/iU', $mime_part->getContents(), $results)) {
return $mime_part;
}
/* Go through list of results, download the image, and create
- * Horde_MIME_Part objects with the data. */
+ * Horde_Mime_Part objects with the data. */
$img_data = array();
$img_parts = array();
$img_request_options = array('timeout' => 5);
if ($request->getResponseCode() == '200') {
/* We need to determine the image type. Try getting
* that information from the returned HTTP
- * content-type header. TODO: Use Horde_MIME_Magic if this
+ * content-type header. TODO: Use Horde_Mime_Magic if this
* fails (?) */
- $part = new Horde_MIME_Part($request->getResponseHeader('content-type'), $request->getResponseBody(), null, 'attachment', '8bit');
+ $part = new Horde_Mime_Part($request->getResponseHeader('content-type'), $request->getResponseBody(), null, 'attachment', '8bit');
$img_data[$url] = '"cid:' . $part->setContentID() . '"';
$img_parts[] = $part;
}
}
/* If we could not successfully download any data, return the
- * original Horde_MIME_Part now. */
+ * original Horde_Mime_Part now. */
if (empty($img_data)) {
return $mime_part;
}
$mime_part->setContents($text);
/* Create new multipart/related part. */
- $related = new Horde_MIME_Part('multipart/related');
+ $related = new Horde_Mime_Part('multipart/related');
/* Get the CID for the 'root' part. Although by default the
* first part is the root part (RFC 2387 [3.2]), we may as
/**
* Remove all attachments from an email message and replace with
* urls to downloadable links. Should properly save all
- * attachments to a new folder and remove the Horde_MIME_Parts for the
+ * attachments to a new folder and remove the Horde_Mime_Parts for the
* attachments.
*
* @param string $baseurl The base URL for creating the links.
- * @param Horde_MIME_Part $base_part The body of the message.
+ * @param Horde_Mime_Part $base_part The body of the message.
* @param string $auth The authorized user who owns the
* attachments.
*
- * @return Horde_MIME_Part Modified part with links to attachments.
+ * @return Horde_Mime_Part Modified part with links to attachments.
* Returns PEAR_Error on error.
*/
public function linkAttachments($baseurl, $base_part, $auth)
$this->deleteAllAttachments();
if ($base_part->getPrimaryType() == 'multipart') {
- $mixed_part = new Horde_MIME_Part('multipart/mixed');
+ $mixed_part = new Horde_Mime_Part('multipart/mixed');
$mixed_part->addPart($base_part);
- $link_part = new Horde_MIME_Part('text/plain', $trailer, $base_part->getCharset(), 'inline', $base_part->getCurrentEncoding());
+ $link_part = new Horde_Mime_Part('text/plain', $trailer, $base_part->getCharset(), 'inline', $base_part->getCurrentEncoding());
$link_part->setDescription(_("Attachment Information"));
$mixed_part->addPart($link_part);
return $mixed_part;
if (is_a($vcard, 'PEAR_Error')) {
$this->_attachVCard = $vcard;
} else {
- $part = new Horde_MIME_Part('text/x-vcard', $vcard, NLS::getCharset());
+ $part = new Horde_Mime_Part('text/x-vcard', $vcard, NLS::getCharset());
$part->setName((strlen($name) ? $name : 'vcard') . '.vcf');
$this->_attachVCard = $part;
}
*
* @param string $body The body text.
* @param IMP_Contents $imp_contents An IMP_Contents object.
- * @param Horde_MIME_Message $mime_message A Horde_MIME_Message object.
+ * @param Horde_Mime_Message $mime_message A Horde_Mime_Message object.
*
* @return string The body text.
*/
return '';
}
- return IMP_Compose::getAddressList(reset(array_filter(array_map('trim', Horde_MIME_Address::explode($addrString, ',;')))));
+ return IMP_Compose::getAddressList(reset(array_filter(array_map('trim', Horde_Mime_Address::explode($addrString, ',;')))));
}
/**
foreach (reset($res) as $val) {
if (!empty($val['email'])) {
if (strpos($val['email'], ',') !== false) {
- $search[] = Horde_MIME_Address::encode($val['name'], 'personal') . ': ' . $val['email'] . ';';
+ $search[] = Horde_Mime_Address::encode($val['name'], 'personal') . ': ' . $val['email'] . ';';
} else {
$mbox_host = explode('@', $val['email']);
if (isset($mbox_host[1])) {
- $search[] = Horde_MIME_Address::writeAddress($mbox_host[0], $mbox_host[1], $val['name']);
+ $search[] = Horde_Mime_Address::writeAddress($mbox_host[0], $mbox_host[1], $val['name']);
}
}
}
protected $_mailbox = null;
/**
- * The Horde_MIME_Message object for the message.
+ * The Horde_Mime_Message object for the message.
*
- * @var Horde_MIME_Message
+ * @var Horde_Mime_Message
*/
protected $_message;
* $imp_contents = &IMP_Contents::singleton($in);
*
* @param mixed $in Either an index string (see IMP_Contents::singleton()
- * for the format) or a Horde_MIME_Message object.
+ * for the format) or a Horde_Mime_Message object.
*
* @return IMP_Contents The IMP_Contents object or null.
*/
{
static $instance = array();
- if (is_a($in, 'Horde_MIME_Message')) {
+ if (is_a($in, 'Horde_Mime_Message')) {
$sig = md5(serialize($in));
} else {
$sig = $in;
* Constructor.
*
* @param mixed $in Either an index string (see IMP_Contents::singleton()
- * for the format) or a Horde_MIME_Message object.
+ * for the format) or a Horde_Mime_Message object.
*/
function __construct($in)
{
- if (is_a($in, 'Horde_MIME_Message')) {
+ if (is_a($in, 'Horde_Mime_Message')) {
$this->_message = $in;
} else {
list($this->_index, $this->_mailbox) = explode(IMP::IDX_SEP, $in);
- /* Get the Horde_MIME_Message object for the given index. */
+ /* Get the Horde_Mime_Message object for the given index. */
try {
$ret = $GLOBALS['imp_imap']->ob->fetch($this->_mailbox, array(
Horde_Imap_Client::FETCH_STRUCTURE => array('parse' => true)
/**
* Returns the header object.
*
- * @return Horde_MIME_Headers The Horde_MIME_Headers object.
+ * @return Horde_Mime_Headers The Horde_Mime_Headers object.
*/
public function getHeaderOb()
{
return $res[$this->_index]['headertext'][0];
} catch (Horde_Imap_Client_Exception $e) {
$GLOBALS['imp_imap']->logException($e);
- return new Horde_MIME_Headers();
+ return new Horde_Mime_Headers();
}
}
/**
- * Returns the Horde_MIME_Message object.
+ * Returns the Horde_Mime_Message object.
*
- * @return Horde_MIME_Message A Horde_MIME_Message object.
+ * @return Horde_Mime_Message A Horde_Mime_Message object.
*/
public function getMIMEMessage()
{
* DEFAULT: TODO
* </pre>
*
- * @return Horde_MIME_Part The raw MIME part asked for (reference).
+ * @return Horde_Mime_Part The raw MIME part asked for (reference).
*/
public function &getMIMEPart($id, $options = array())
{
$contents = $this->getBodyPart($id);
if (($part->getPrimaryType() == 'text') &&
(String::upper($part->getCharset()) == 'US-ASCII') &&
- Horde_MIME::is8bit($contents)) {
+ Horde_Mime::is8bit($contents)) {
$contents = String::convertCharset($contents, 'US-ASCII');
}
$part->setContents($contents);
public function renderMIMEPart($mime_id, $options = array())
{
$mime_part = $this->getMIMEPart($mime_id);
- $viewer = Horde_MIME_Viewer::factory(empty($options['type']) ? $mime_part->getType() : $options['type']);
+ $viewer = Horde_Mime_Viewer::factory(empty($options['type']) ? $mime_part->getType() : $options['type']);
$viewer->setMIMEPart($mime_part);
$viewer->setParams(array('contents' => &$this));
foreach ($this->_message->contentTypeMap() as $mime_id => $mime_type) {
if ($slinks &&
in_array($mime_type, array('application/octet-stream', 'application/base64'))) {
- $mime_type = Horde_MIME_Magic::filenameToMIME($mime_part->getName());
+ $mime_type = Horde_Mime_Magic::filenameToMIME($mime_part->getName());
$param_array['ctype'] = $mime_type;
} else {
$param_array = array();
$mime_part = $this->getMIMEPart($mime_id, array('nocontents' => true, 'nodecode' => true));
$bytes = $mime_part->getBytes();
- $icon = Horde::img(Horde_MIME_Viewer::getIcon($mime_type), '', array('title' => $mime_type));
+ $icon = Horde::img(Horde_Mime_Viewer::getIcon($mime_type), '', array('title' => $mime_type));
$description = $mime_part->getDescription(true);
if (empty($description)) {
}
$last_id = null;
- $viewer = Horde_MIME_Viewer::factory($mime_type);
+ $viewer = Horde_Mime_Viewer::factory($mime_type);
if ($viewer->canDisplayInline()) {
$mime_part = $this->getMIMEPart($mime_id, array('nocontents' => true, 'nodecode' => true));
/**
* Return the URL to the view.php page.
*
- * @param Horde_MIME_Part $mime_part The MIME part to view.
+ * @param Horde_Mime_Part $mime_part The MIME part to view.
* @param integer $actionID The actionID to perform.
* @param array $options Additional options:
* <pre>
/**
* Generate a link to the view.php page.
*
- * @param Horde_MIME_Part $mime_part The MIME part to view.
+ * @param Horde_Mime_Part $mime_part The MIME part to view.
* @param integer $actionID The actionID value.
* @param string $text The ESCAPED (!) link text.
* @param array $options Additional parameters:
/**
* Generate a javascript link to the view.php page.
*
- * @param Horde_MIME_Part $mime_part The MIME part to view.
+ * @param Horde_Mime_Part $mime_part The MIME part to view.
* @param string $actionID The actionID to perform.
* @param string $text The ESCAPED (!) link text.
* @param array $options Additional options:
/**
* Determines if a MIME part is downloadable.
*
- * @param Horde_MIME_Part $mime_part The MIME part object.
+ * @param Horde_Mime_Part $mime_part The MIME part object.
*
* @return boolean True if downloadable.
*/
*
* @param string $text See Horde_Crypt_pgp::parsePGPData()
*
- * @return array Returns an array of Horde_MIME_Part objects.
+ * @return array Returns an array of Horde_Mime_Part objects.
* If there was no PGP data, returns false.
*/
function &parseMessage($text)
reset($result);
do {
$block = current($result);
- $temp_part = new Horde_MIME_Part();
+ $temp_part = new Horde_Mime_Part();
$temp_part->setContents(implode("\n", $block['data']));
/* Since private keys should NEVER be sent across email (in fact,
/**
* Renders a text message with PGP components.
*
- * @param Horde_MIME_Part &$part The part containing the data to
+ * @param Horde_Mime_Part &$part The part containing the data to
* render.
* @param IMP_Contents &$contents The IMP_Contents:: module to use to
* output the text.
$base_ob = &$contents->getBaseObjectPtr();
$addr = $base_ob->getFromAddress();
- $message = new Horde_MIME_Message();
+ $message = new Horde_Mime_Message();
foreach ($parts as $val) {
$message->addPart($val);
}
continue;
}
$v = &$mc->getMIMEViewer($val);
- if (!is_a($v, 'IMP_Horde_MIME_Viewer_pgp')) {
+ if (!is_a($v, 'IMP_Horde_Mime_Viewer_pgp')) {
$text .= $mc->formatStatusMsg(_("The message below has not been digitally signed or encrypted with PGP."), Horde::img('alerts/warning.png', _("Warning"), '', $GLOBALS['registry']->getImageDir('horde')));
}
$text .= $mc->renderMIMEPart($val);
}
/**
- * Returns the signed data only for a plaintext signed Horde_MIME_Part.
+ * Returns the signed data only for a plaintext signed Horde_Mime_Part.
*
- * @param Horde_MIME_Part $mime_part The object with a plaintext PGP
+ * @param Horde_Mime_Part $mime_part The object with a plaintext PGP
* signed message in the contents.
*
* @return string The contents of the signed message.
/**
* Generates the javascript code for saving public keys.
*
- * @param Horde_MIME_Part &$mime_part The part containing the public key.
+ * @param Horde_Mime_Part &$mime_part The part containing the public key.
* @param string $cache The part identifier.
*
* @return string The URL for saving public keys.
$addr_list = array();
foreach ($addresses as $val) {
- $addrOb = Horde_MIME_Address::bareAddress($val, $_SESSION['imp']['maildomain'], true);
+ $addrOb = Horde_Mime_Address::bareAddress($val, $_SESSION['imp']['maildomain'], true);
$key_addr = array_pop($addrOb);
/* Get the public key for the address. */
}
/**
- * Sign a Horde_MIME_Part using PGP using IMP default parameters.
+ * Sign a Horde_Mime_Part using PGP using IMP default parameters.
*
- * @param Horde_MIME_Part $mime_part The object to sign.
+ * @param Horde_Mime_Part $mime_part The object to sign.
*
- * @return Horde_MIME_Part See Horde_Crypt_pgp::signMIMEPart(). Returns
+ * @return Horde_Mime_Part See Horde_Crypt_pgp::signMIMEPart(). Returns
* PEAR_Error object on error.
*/
function IMPsignMIMEPart($mime_part)
}
/**
- * Encrypt a Horde_MIME_Part using PGP using IMP default parameters.
+ * Encrypt a Horde_Mime_Part using PGP using IMP default parameters.
*
- * @param Horde_MIME_Part $mime_part The object to encrypt.
+ * @param Horde_Mime_Part $mime_part The object to encrypt.
* @param array $addresses The e-mail address of the keys to use for
* encryption.
* @param boolean $symmetric Whether to encrypt symmetrically.
*
- * @return Horde_MIME_Part See Horde_Crypt_pgp::encryptMIMEPart(). Returns
+ * @return Horde_Mime_Part See Horde_Crypt_pgp::encryptMIMEPart(). Returns
* PEAR_Error object on error.
*/
function IMPencryptMIMEPart($mime_part, $addresses, $symmetric = false)
}
/**
- * Sign and Encrypt a Horde_MIME_Part using PGP using IMP default parameters.
+ * Sign and Encrypt a Horde_Mime_Part using PGP using IMP default parameters.
*
- * @param Horde_MIME_Part $mime_part The object to sign and encrypt.
+ * @param Horde_Mime_Part $mime_part The object to sign and encrypt.
* @param array $addresses The e-mail address of the keys to use for
* encryption.
* @param boolean $symmetric Whether to encrypt symmetrically.
*
- * @return Horde_MIME_Part See Horde_Crypt_pgp::signAndencryptMIMEPart().
+ * @return Horde_Mime_Part See Horde_Crypt_pgp::signAndencryptMIMEPart().
* Returns PEAR_Error object on error.
*/
function IMPsignAndEncryptMIMEPart($mime_part, $addresses,
}
/**
- * Generate a Horde_MIME_Part object, in accordance with RFC 2015/3156, that
+ * Generate a Horde_Mime_Part object, in accordance with RFC 2015/3156, that
* contains the user's public key.
*
- * @return Horde_MIME_Part See Horde_Crypt_pgp::publicKeyMIMEPart().
+ * @return Horde_Mime_Part See Horde_Crypt_pgp::publicKeyMIMEPart().
*/
function publicKeyMIMEPart()
{
function _encryptParameters($address)
{
/* We can only encrypt if we are sending to a single person. */
- $addrOb = Horde_MIME_Address::bareAddress($address, $_SESSION['imp']['maildomain'], true);
+ $addrOb = Horde_Mime_Address::bareAddress($address, $_SESSION['imp']['maildomain'], true);
$key_addr = array_pop($addrOb);
$public_key = $this->getPublicKey($key_addr);
* The IMP_Fetchmail:: class provides an interface to download mail from
* remote mail servers.
*
- * $Horde: imp/lib/Fetchmail.php,v 1.68 2008/10/11 07:04:14 slusarz Exp $
+ * $Horde: imp/lib/Fetchmail.php,v 1.69 2008/11/09 07:38:45 slusarz Exp $
*
* Copyright 2002-2008 The Horde Project (http://www.horde.org/)
*
{
if (!empty($GLOBALS['conf']['fetchmail']['size_limit']) &&
($size > $GLOBALS['conf']['fetchmail']['size_limit'])) {
- $GLOBALS['notification']->push(sprintf(_("The message \"%s\" from \"%s\" (%d bytes) exceeds fetch size limit."), Horde_MIME::decode($subject), Horde_MIME::decode($from), $size), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("The message \"%s\" from \"%s\" (%d bytes) exceeds fetch size limit."), Horde_Mime::decode($subject), Horde_Mime::decode($from), $size), 'horde.warning');
return false;
}
* The IMP_Fetchmail_imap driver implements the IMAP_Fetchmail class for use
* with IMAP/POP3 servers.
*
- * $Horde: imp/lib/Fetchmail/imap.php,v 1.23 2008/01/02 11:12:43 jan Exp $
+ * $Horde: imp/lib/Fetchmail/imap.php,v 1.24 2008/11/09 07:16:01 slusarz Exp $
*
* Copyright 2002-2008 The Horde Project (http://www.horde.org/)
*
reset($fetch_res);
while (list($id, $ob) = each($fetch_res)) {
/* Check message size. */
- if (!$this->_checkMessageSize($ob['size'], $ob['envelope']['subject'], Horde_MIME_Address::addrArray2String($ob['envelope']['from']))) {
+ if (!$this->_checkMessageSize($ob['size'], $ob['envelope']['subject'], Horde_Mime_Address::addrArray2String($ob['envelope']['from']))) {
continue;
}
*
* @todo Don't use notification.
*
- * $Horde: imp/lib/Folder.php,v 1.226 2008/10/13 20:51:51 slusarz Exp $
+ * $Horde: imp/lib/Folder.php,v 1.227 2008/11/09 07:38:45 slusarz Exp $
*
* Copyright 2000-2008 The Horde Project (http://www.horde.org/)
*
* The IMP_IMAP:: class provides common functions for interaction with the
* IMAP/POP3 server via the Horde_Imap_Client:: library.
*
- * $Horde: imp/lib/IMAP.php,v 1.52 2008/10/11 01:36:51 slusarz Exp $
+ * $Horde: imp/lib/IMAP.php,v 1.53 2008/11/09 07:16:02 slusarz Exp $
*
* Copyright 2008 The Horde Project (http://www.horde.org/)
*
}
if (!empty($address)) {
- $ob = Horde_MIME_Address::parseAddressList($address, array('defserver' => $_SESSION['imp']['maildomain']));
+ $ob = Horde_Mime_Address::parseAddressList($address, array('defserver' => $_SESSION['imp']['maildomain']));
}
if (empty($ob)) {
$ob['message'] .= ' ' . _("Your From address is not a valid email address. This can be fixed in your Personal Information options page.");
}
}
- $from = Horde_MIME_Address::writeAddress($ob[0]['mailbox'], $ob[0]['host'], $name);
+ $from = Horde_Mime_Address::writeAddress($ob[0]['mailbox'], $ob[0]['host'], $name);
$froms[$ident] = $from;
return $from;
if (!is_array($bcc)) {
$bcc = array($bcc);
}
- return Horde_MIME_Address::parseAddressList(implode(', ', $bcc));
+ return Horde_Mime_Address::parseAddressList(implode(', ', $bcc));
}
}
$addresses = array($addresses);
}
- $addr_list = Horde_MIME_Address::parseAddressList(implode(', ', $addresses));
+ $addr_list = Horde_Mime_Address::parseAddressList(implode(', ', $addresses));
if (empty($addr_list)) {
return null;
}
<?php
/**
- * The IMP_Horde_MIME_Viewer_alternative class renders out messages from
+ * The IMP_Horde_Mime_Viewer_alternative class renders out messages from
* multipart/alternative content types (RFC 2046 [5.1.4]).
*
* $Horde: imp/lib/MIME/Viewer/alternative.php,v 1.66 2008/01/02 11:12:45 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_alternative extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_alternative extends Horde_Mime_Viewer_Driver
{
/**
* The content-type of the preferred part.
<?php
/**
- * The IMP_Horde_MIME_Viewer_appledouble class handles multipart/appledouble
+ * The IMP_Horde_Mime_Viewer_appledouble class handles multipart/appledouble
* messages conforming to RFC 1740.
*
* $Horde: imp/lib/MIME/Viewer/appledouble.php,v 1.27 2008/10/06 21:19:49 slusarz Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_appledouble extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_appledouble extends Horde_Mime_Viewer_Driver
{
/**
* Force viewing of a part inline, regardless of the Content-Disposition
/* Display the content of the file. */
$part = $contents->getDecodedMIMEPart($this->mime_part->getRelativeMIMEId(2));
if ($part) {
- $mime_message = Horde_MIME_Message::convertMIMEPart($part);
+ $mime_message = Horde_Mime_Message::convertMIMEPart($part);
$mc = new IMP_Contents($mime_message, array('download' => 'download_attach', 'view' => 'view_attach'), array(&$contents));
$mc->buildMessage();
$text .= '<table cellspacing="0">' . $mc->getMessage(true) . '</table>';
<?php
/**
- * The IMP_Horde_MIME_Viewer_enriched class renders out plain text from
+ * The IMP_Horde_Mime_Viewer_enriched class renders out plain text from
* enriched content tags, ala RFC 1896
*
* $Horde: imp/lib/MIME/Viewer/enriched.php,v 1.42 2008/01/02 11:12:45 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Eric Rostetter <eric.rostetter@physics.utexas.edu>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_enriched extends Horde_MIME_Viewer_enriched
+class IMP_Horde_Mime_Viewer_enriched extends Horde_Mime_Viewer_enriched
{
/**
* Render out the currently set contents.
<?php
/**
- * The IMP_Horde_MIME_Viewer_html class renders out HTML text with an effort
+ * The IMP_Horde_Mime_Viewer_html class renders out HTML text with an effort
* to remove potentially malicious code.
*
* $Horde: imp/lib/MIME/Viewer/html.php,v 1.150 2008/09/25 03:42:05 slusarz Exp $
* @author Anil Madhavapeddy <anil@recoil.org>
* @author Jon Parise <jon@horde.org>
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_html extends Horde_MIME_Viewer_html
+class IMP_Horde_Mime_Viewer_html extends Horde_Mime_Viewer_html
{
/**
* Cached block image.
<?php
/**
- * The IMP_Horde_MIME_Viewer_images class allows images to be displayed
+ * The IMP_Horde_Mime_Viewer_images class allows images to be displayed
* inline in a message.
*
* $Horde: imp/lib/MIME/Viewer/images.php,v 1.81 2008/06/03 18:03:40 slusarz Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_images extends Horde_MIME_Viewer_images
+class IMP_Horde_Mime_Viewer_images extends Horde_Mime_Viewer_images
{
/**
* The content-type of the generated data.
*
* @author Chuck Hagenbuch <chuck@horde.org>
* @author Mike Cochrane <mike@graftonhall.co.nz>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_itip extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_itip extends Horde_Mime_Viewer_Driver
{
/**
* Force viewing of a part inline, regardless of the Content-Disposition
// Check if we got vcard data with the wrong vcalendar mime type.
$c = $vCal->getComponentClasses();
if (count($c) == 1 && !empty($c['horde_icalendar_vcard'])) {
- $vcard_renderer = &Horde_MIME_Viewer::factory($this->mime_part, 'text/x-vcard');
+ $vcard_renderer = &Horde_Mime_Viewer::factory($this->mime_part, 'text/x-vcard');
return $vcard_renderer->render($params);
}
$vEvent_reply->setAttribute('ATTENDEE', 'mailto:' . $email, $params);
$vCal->addComponent($vEvent_reply);
- $mime = new Horde_MIME_Part('multipart/alternative');
- $body = new Horde_MIME_Part('text/plain',
+ $mime = new Horde_Mime_Part('multipart/alternative');
+ $body = new Horde_Mime_Part('text/plain',
String::wrap($message, 76, "\n"),
NLS::getCharset());
- $ics = new Horde_MIME_Part('text/calendar', $vCal->exportvCalendar());
+ $ics = new Horde_Mime_Part('text/calendar', $vCal->exportvCalendar());
$ics->setName('event-reply.ics');
$ics->setContentTypeParameter('METHOD', 'REPLY');
$ics->setCharset(NLS::getCharset());
$mime->addPart($body);
$mime->addPart($ics);
- $mime = &Horde_MIME_Message::convertMimePart($mime);
+ $mime = &Horde_Mime_Message::convertMimePart($mime);
// Build the reply headers.
- $msg_headers = new Horde_MIME_Headers();
+ $msg_headers = new Horde_Mime_Headers();
$msg_headers->addReceivedHeader();
$msg_headers->addMessageIdHeader();
$msg_headers->addHeader('Date', date('r'));
if (!empty($replyto) && ($replyto != $email)) {
$msg_headers->addHeader('Reply-to', $replyto);
}
- $msg_headers->addHeader('Subject', Horde_MIME::encode($subject, NLS::getCharset()));
+ $msg_headers->addHeader('Subject', Horde_Mime::encode($subject, NLS::getCharset()));
// Send the reply.
$status = $mime->send($organizerEmail, $msg_headers,
$vCal->setAttribute('METHOD', 'REPLY');
$vCal->addComponent($vfb_reply);
- $mime = new Horde_MIME_Message();
+ $mime = new Horde_Mime_Message();
$message = _("Attached is a reply to a calendar request you sent.");
- $body = new Horde_MIME_Part('text/plain',
+ $body = new Horde_Mime_Part('text/plain',
String::wrap($message, 76, "\n"),
NLS::getCharset());
- $ics = new Horde_MIME_Part('text/calendar', $vCal->exportvCalendar());
+ $ics = new Horde_Mime_Part('text/calendar', $vCal->exportvCalendar());
$ics->setName('icalendar.ics');
$ics->setContentTypeParameter('METHOD', 'REPLY');
$ics->setCharset(NLS::getCharset());
$mime->addPart($ics);
// Build the reply headers.
- $msg_headers = new Horde_MIME_Headers();
+ $msg_headers = new Horde_Mime_Headers();
$msg_headers->addReceivedHeader();
$msg_headers->addMessageIdHeader();
$msg_headers->addHeader('Date', date('r'));
if (!empty($replyto) && ($replyto != $email)) {
$msg_headers->addHeader('Reply-to', $replyto);
}
- $msg_headers->addHeader('Subject', Horde_MIME::encode(_("Free/Busy Request Response"), NLS::getCharset()));
+ $msg_headers->addHeader('Subject', Horde_Mime::encode(_("Free/Busy Request Response"), NLS::getCharset()));
// Send the reply.
$status = $mime->send($organizerEmail, $msg_headers,
<?php
/**
- * The IMP_Horde_MIME_Viewer_notification class handles multipart/report
+ * The IMP_Horde_Mime_Viewer_notification class handles multipart/report
* messages that refer to mail notification messages (RFC 2298).
*
* $Horde: imp/lib/MIME/Viewer/notification.php,v 1.29 2008/05/26 05:36:51 slusarz Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_notification extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_notification extends Horde_Mime_Viewer_Driver
{
/**
* Render out the currently set contents.
<?php
/**
- * The IMP_Horde_MIME_Viewer_partial class allows multipart/partial messages
+ * The IMP_Horde_Mime_Viewer_partial class allows multipart/partial messages
* to be displayed (RFC 2046 [5.2.2]).
*
* $Horde: imp/lib/MIME/Viewer/partial.php,v 1.39 2008/09/17 05:02:40 slusarz Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_partial extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_partial extends Horde_Mime_Viewer_Driver
{
/**
* Render out the currently set contents.
<?php
/**
- * The IMP_Horde_MIME_Viewer_pdf class enables generation of thumbnails for
+ * The IMP_Horde_Mime_Viewer_pdf class enables generation of thumbnails for
* PDF attachments.
*
* $Horde: imp/lib/MIME/Viewer/pdf.php,v 1.4 2008/10/20 00:38:06 slusarz Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME_Viewer
+ * @package Horde_Mime_Viewer
*/
-class IMP_Horde_MIME_Viewer_pdf extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_pdf extends Horde_Mime_Viewer_Driver
{
/**
* The content-type of the generated data.
require_once IMP_BASE . '/lib/Crypt/PGP.php';
/**
- * The IMP_Horde_MIME_Viewer_pgp class allows viewing/decrypting of PGP
+ * The IMP_Horde_Mime_Viewer_pgp class allows viewing/decrypting of PGP
* formatted messages. This class implements RFC 3156.
*
* This class handles the following MIME types:
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_pgp extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_pgp extends Horde_Mime_Viewer_Driver
{
/**
* IMP_PGP object.
$subpart = $mime->getPart($mime->getRelativeMIMEId(1));
$signature_data = rtrim($subpart->getCanonicalContents(), "\r");
- $mime_message = Horde_MIME_Message::parseMessage($signature_data);
+ $mime_message = Horde_Mime_Message::parseMessage($signature_data);
/* The PGP signature appears in the second MIME subpart. */
$subpart = $mime->getPart($mime->getRelativeMIMEId(2));
}
} elseif ($mimetype == 'application/pgp-signature') {
/* Get the signed message to output. */
- $mime_message = new Horde_MIME_Message();
+ $mime_message = new Horde_Mime_Message();
$mime_message->setType('text/plain');
$mime->transferDecodeContents();
} else {
/* We need to check if this is a signed/encrypted
message. */
- $mime_message = Horde_MIME_Message::parseMessage($decrypted_data->message);
+ $mime_message = Horde_Mime_Message::parseMessage($decrypted_data->message);
if (!$mime_message) {
require_once 'Horde/Text/Filter.php';
$text .= $this->_signedOutput($decrypted_data->sig_result);
require_once IMP_BASE . '/lib/Crypt/SMIME.php';
/**
- * The IMP_Horde_MIME_Viewer_pkcs7 class allows viewing/decrypting of S/MIME
+ * The IMP_Horde_Mime_Viewer_pkcs7 class allows viewing/decrypting of S/MIME
* messages.
* This class implements parts of RFC 2630, RFC 2632, and RFC 2633.
*
*
* @author Mike Cochrane <mike@graftonhall.co.nz>
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME_Viewer
+ * @package Horde_Mime_Viewer
*/
-class IMP_Horde_MIME_Viewer_pkcs7 extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_pkcs7 extends Horde_Mime_Viewer_Driver
{
/**
* IMP_SMIME object.
* Some mailers set S/MIME messages to always be attachments. However,
* most of the time S/MIME is used to secure the contents of the message,
* so displaying as an attachment makes no sense. Therefore, force
- * viewing inline (or at least let Horde_MIME_Viewer/IMP_Contents make the
+ * viewing inline (or at least let Horde_Mime_Viewer/IMP_Contents make the
* determination on whether the data can be viewed inline or not).
*
* @var boolean
/* Data that is signed appears in the first MIME subpart. */
$signed_part = $mime->getPart($mime->getRelativeMIMEId(1));
$signed_data = rtrim($signed_part->getCanonicalContents(), "\r");
- $mime_message = Horde_MIME_Message::parseMessage($signed_data);
+ $mime_message = Horde_Mime_Message::parseMessage($signed_data);
/* The S/MIME signature appears in the second MIME subpart. */
$subpart = $mime->getPart($mime->getRelativeMIMEId(2));
$this->_status[] = $msg_data->getMessage();
$mime_message = $mime;
} else {
- $mime_message = Horde_MIME_Message::parseMessage($msg_data);
+ $mime_message = Horde_Mime_Message::parseMessage($msg_data);
}
}
}
/* We need to check if this is a signed/encrypted message. */
- $mime_message = Horde_MIME_Message::parseMessage($decrypted_data);
+ $mime_message = Horde_Mime_Message::parseMessage($decrypted_data);
if ($mime_message) {
/* Check for signed and encoded data. */
if (in_array($mime_message->getType(), array('multipart/signed', 'application/pkcs7-mime', 'application/x-pkcs7-mime'))) {
<?php
/**
- * The IMP_Horde_MIME_Viewer_plain class renders out text/plain MIME parts
+ * The IMP_Horde_Mime_Viewer_plain class renders out text/plain MIME parts
* with URLs made into hyperlinks.
*
* $Horde: imp/lib/MIME/Viewer/plain.php,v 1.92 2008/10/06 21:19:49 slusarz Exp $
*
* @author Anil Madhavapeddy <anil@recoil.org>
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME_Viewer
+ * @package Horde_Mime_Viewer
*/
-class IMP_Horde_MIME_Viewer_plain extends Horde_MIME_Viewer_plain
+class IMP_Horde_Mime_Viewer_plain extends Horde_Mime_Viewer_plain
{
/**
* TODO
<?php
/**
- * The IMP_Horde_MIME_Viewer_related class handles multipart/related messages
+ * The IMP_Horde_Mime_Viewer_related class handles multipart/related messages
* as defined by RFC 2387.
*
* $Horde: imp/lib/MIME/Viewer/related.php,v 1.38 2008/01/02 11:12:45 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_related extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_related extends Horde_Mime_Viewer_Driver
{
/**
* The character set of the rendered HTML part.
<?php
/**
- * The IMP_Horde_MIME_Viewer_rfc822 class renders out messages from
+ * The IMP_Horde_Mime_Viewer_rfc822 class renders out messages from
* message/rfc822 content types.
*
* $Horde: imp/lib/MIME/Viewer/rfc822.php,v 1.41 2008/01/02 11:12:45 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_rfc822 extends Horde_MIME_Viewer_rfc822
+class IMP_Horde_Mime_Viewer_rfc822 extends Horde_Mime_Viewer_rfc822
{
/**
* Render out the currently set contents.
<?php
/**
- * The IMP_Horde_MIME_Viewer_smil renders SMIL documents to very basic HTML.
+ * The IMP_Horde_Mime_Viewer_smil renders SMIL documents to very basic HTML.
*
* $Horde: imp/lib/MIME/Viewer/smil.php,v 1.5 2008/01/02 11:12:45 jan Exp $
*
*
* @author Jan Schneider <jan@horde.org>
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_smil extends Horde_MIME_Viewer_smil
+class IMP_Horde_Mime_Viewer_smil extends Horde_Mime_Viewer_smil
{
/**
* The MIME_Contents object, needed for the _callback() function.
<?php
/**
- * The IMP_Horde_MIME_Viewer_status class handles multipart/report messages
+ * The IMP_Horde_Mime_Viewer_status class handles multipart/report messages
* that refer to mail system administrative messages (RFC 3464).
*
* $Horde: imp/lib/MIME/Viewer/status.php,v 1.33 2008/01/02 11:12:45 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_status extends Horde_MIME_Viewer_Driver
+class IMP_Horde_Mime_Viewer_status extends Horde_Mime_Viewer_Driver
{
/**
* Render out the currently set contents.
/* If this is a straight message/delivery-status part, just output
the text. */
if ($this->mime_part->getType() == 'message/delivery-status') {
- $part = new Horde_MIME_Part('text/plain');
+ $part = new Horde_Mime_Part('text/plain');
$part->setContents($this->mime_part->getContents());
return '<pre>' . $contents->renderMIMEPart($part) . '</pre>';
}
<?php
/**
- * The IMP_Horde_MIME_Viewer_tnef class allows MS-TNEF attachments to be
+ * The IMP_Horde_Mime_Viewer_tnef class allows MS-TNEF attachments to be
* displayed.
*
* $Horde: imp/lib/MIME/Viewer/tnef.php,v 1.39 2008/09/04 12:01:14 jan Exp $
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_tnef extends Horde_MIME_Viewer_tnef
+class IMP_Horde_Mime_Viewer_tnef extends Horde_Mime_Viewer_tnef
{
/**
* The contentType of the attachment.
$type = $data['type'] . '/' . $data['subtype'];
if (($type == 'application/octet-stream') ||
($type == 'application/base64')) {
- $type = Horde_MIME_Magic::filenameToMIME($data['name']);
+ $type = Horde_Mime_Magic::filenameToMIME($data['name']);
}
$temp_part->setType($type);
<?php
/**
- * The IMP_Horde_MIME_Viewer_zip class renders out the contents of ZIP files
+ * The IMP_Horde_Mime_Viewer_zip class renders out the contents of ZIP files
* in HTML format and allows downloading of extractable files.
*
* $Horde: imp/lib/MIME/Viewer/zip.php,v 1.40 2008/03/17 14:11:18 jan Exp $
*
* @author Mike Cochrane <mike@graftonhall.co.nz>
* @author Michael Slusarz <slusarz@horde.org>
- * @package Horde_MIME
+ * @package Horde_Mime
*/
-class IMP_Horde_MIME_Viewer_zip extends Horde_MIME_Viewer_zip
+class IMP_Horde_Mime_Viewer_zip extends Horde_Mime_Viewer_zip
{
/**
* The IMP_Contents object, needed for the _callback() function.
}
foreach ($partids as $partid) {
$oldPart = $message->getPart($partid);
- if (!is_a($oldPart, 'Horde_MIME_Part')) {
+ if (!is_a($oldPart, 'Horde_Mime_Part')) {
continue;
}
- $newPart = new Horde_MIME_Part('text/plain');
+ $newPart = new Horde_Mime_Part('text/plain');
/* We need to make sure all text is in the correct charset. */
$newPart->setCharset(NLS::getCharset());
$recipients = array($recipients);
}
foreach ($recipients as $addresses) {
- $addresses = Horde_MIME_Address::bareAddress($addresses, $_SESSION['imp']['maildomain'], true);
+ $addresses = Horde_Mime_Address::bareAddress($addresses, $_SESSION['imp']['maildomain'], true);
foreach ($addresses as $recipient) {
$this->_log($action, $message_id, $recipient, $success);
}
function _sendSpamReportMessage($action, $data)
{
/* Build the MIME structure. */
- $mime = new Horde_MIME_Message();
+ $mime = new Horde_Mime_Message();
$mime->setType('multipart/digest');
- $mime->addPart(new Horde_MIME_Part('message/rfc822', $data));
+ $mime->addPart(new Horde_Mime_Part('message/rfc822', $data));
$spam_headers = new IMP_Headers();
$spam_headers->addMessageIdHeader();
// convert to RFC-compliant ',' delimiter for processing.
require_once 'Horde/String.php';
$clean_to = '';
- foreach (Horde_MIME_Address::explode($to, ',;') as $val) {
+ foreach (Horde_Mime_Address::explode($to, ',;') as $val) {
$val = trim($val);
$clean_to .= $val . (($val[String::length($val) - 1] == ';') ? ' ' : ', ');
}
$this->_c['drafts_sm_folder'] = IMP::isSpecialFolder($this->_mailbox);
}
- $from = Horde_MIME_Address::getAddressesFromObject($ob['from']);
+ $from = Horde_Mime_Address::getAddressesFromObject($ob['from']);
$from = array_shift($from);
if (empty($from)) {
$ret['from'] = _("Undisclosed Recipients");
$ret['error'] = true;
} else {
- $to = Horde_MIME_Address::getAddressesFromObject($ob['to']);
+ $to = Horde_Mime_Address::getAddressesFromObject($ob['to']);
$first_to = array_shift($to);
if (empty($first_to)) {
$ret['from'] = _("Undisclosed Recipients");
*/
function getSubject($subject)
{
- $subject = Horde_MIME::decode($subject, $this->_charset);
+ $subject = Horde_Mime::decode($subject, $this->_charset);
return empty($subject)
? _("[No Subject]")
: IMP::filterText(preg_replace("/\s+/", ' ', $subject));
}
/* Check to see if an MDN has been requested. */
- $mdn = new Horde_MIME_MDN($headers);
+ $mdn = new Horde_Mime_MDN($headers);
if ($mdn->getMDNReturnAddr()) {
require_once IMP_BASE . '/lib/Maillog.php';
$msg_id = $headers->getValue('message-id');
/**
* Parses all of the available mailing list headers.
*
- * @param Horde_MIME_Headers $headers A Horde_MIME_Headers object.
+ * @param Horde_Mime_Headers $headers A Horde_Mime_Headers object.
*
* @return array TODO
*/
/**
* Determines the X-Priority of the message based on the headers.
*
- * @param Horde_MIME_Headers $headers Horde_MIME_Headers object.
+ * @param Horde_Mime_Headers $headers Horde_Mime_Headers object.
*
* @return string 'high', 'low', or 'normal'.
*/
/**
* Returns e-mail information for a mailing list.
*
- * @param Horde_MIME_Headers $headers A Horde_MIME_Headers object.
+ * @param Horde_Mime_Headers $headers A Horde_Mime_Headers object.
*
* @return array An array with 2 elements: 'exists' and 'reply_list'.
*/
* Builds a string containing a list of addresses.
*
* @param array $addrlist The list of addresses from
- * Horde_MIME_Address::parseAddressList().
+ * Horde_Mime_Address::parseAddressList().
* @param integer $addURL The self URL.
* @param boolean $link Link each address to the compose screen?
*
$addr_array = array();
- foreach (Horde_MIME_Address::getAddressesFromObject($addrlist) as $ob) {
+ foreach (Horde_Mime_Address::getAddressesFromObject($addrlist) as $ob) {
if (isset($ob['groupname'])) {
$group_array = array();
foreach ($ob['addresses'] as $ad) {
$flagbits = 0;
if ($_SESSION['imp']['protocol'] != 'pop') {
- $to_ob = Horde_MIME_Address::getAddressesFromObject($ob['envelope']['to']);
+ $to_ob = Horde_Mime_Address::getAddressesFromObject($ob['envelope']['to']);
if (!empty($to_ob) && $identity->hasAddress($to_ob[0]['inner'])) {
$msg['status'] .= Horde::img('mail_personal.png', _("Personal"), array('title' => _("Personal")));
$flagbits |= IMP::FLAG_PERSONAL;
/* Determine if we need to show the Reply to All link. */
$addresses = array_keys($user_identity->getAllFromAddresses(true));
$show_reply_all = true;
-if (!Horde_MIME_Address::addrArray2String(array_merge($envelope['to'], $envelope['cc']), $addresses)) {
+if (!Horde_Mime_Address::addrArray2String(array_merge($envelope['to'], $envelope['cc']), $addresses)) {
$show_reply_all = false;
}
'description' => isset($ob['preview']) ? $ob['preview'] : '',
'url' => Horde::applicationURL(IMP::generateIMPUrl('message.php', $mailbox, $ob['uid'], $mailbox), true, -1),
'fromAddr' => $from_addr['fullfrom'],
- 'toAddr' => Horde_MIME_Address::addrArray2String(isset($ob['envelope']['to']) ? $ob['envelope']['to'] : array())
+ 'toAddr' => Horde_Mime_Address::addrArray2String(isset($ob['envelope']['to']) ? $ob['envelope']['to'] : array())
));
}
}
if (IMP::isSpecialFolder($mbox)) {
$curr_msg['addr_to'] = true;
$curr_msg['addr'] = _("To:") . ' ' . $imp_ui->buildAddressLinks($envelope['to'], Horde::selfUrl(true), true);
- $addr = _("To:") . ' ' . htmlspecialchars(Horde_MIME_Address::addrObject2String(reset($envelope['to'])), ENT_COMPAT, $charset);
+ $addr = _("To:") . ' ' . htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['to'])), ENT_COMPAT, $charset);
} else {
$curr_msg['addr_to'] = false;
$curr_msg['addr'] = $imp_ui->buildAddressLinks($envelope['from'], Horde::selfUrl(true), true);
- $addr = htmlspecialchars(Horde_MIME_Address::addrObject2String(reset($envelope['from'])), ENT_COMPAT, $charset);
+ $addr = htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['from'])), ENT_COMPAT, $charset);
}
$subject_header = htmlspecialchars($envelope['subject'], ENT_COMPAT, $charset);
<?php
/**
- * This script displays a rendered Horde_MIME_Part object.
+ * This script displays a rendered Horde_Mime_Part object.
* The following are potential URL parameters that we should honor:
* 'actionID' -- The action ID to perform
* -> 'compose_attach_preview'
* -> 'view_attach'
* -> 'view_source'
* 'ctype' -- The content-type to use instead of the content-type
- * found in the original Horde_MIME_Part object.
+ * found in the original Horde_Mime_Part object.
* 'download_ids' -- For 'download_all', the list of IDs to download.
* 'id' -- The MIME part to display.
* 'index -- The index of the message.
/* 'compose_attach_preview' doesn't use IMP_Contents since there is no
* IMAP message data - rather, we must use the IMP_Compose object to
- * get the necessary Horde_MIME_Part. */
+ * get the necessary Horde_Mime_Part. */
if ($actionID == 'compose_attach_preview') {
/* Initialize the IMP_Compose:: object. */
$imp_compose = &IMP_Compose::singleton(Util::getFormData('messageCache'));
$name = 'saved_message';
}
- if (!($from = Horde_MIME_Address::bareAddress($mime_headers->getValue('from')))) {
+ if (!($from = Horde_Mime_Address::bareAddress($mime_headers->getValue('from')))) {
$from = '<>';
}