Changeset:
6e04b0d7be39
https://sourceforge.net/p/mrbs/hg-code/ci/6e04b0d7be39e8b6f3712e39f44ddd3c19d21913
Author:
Campbell Morrison <[email protected]>
Date:
Tue Sep 22 21:13:04 2015 +0100
Log message:
Updated PEAR Mail_Mime package to version 1.10.0
diffstat:
web/Mail/mime.php | 3121 +++++++++++++++++++++++++-----------------------
web/Mail/mimePart.php | 2510 +++++++++++++++++++-------------------
2 files changed, 2875 insertions(+), 2756 deletions(-)
diffs (truncated from 5639 to 300 lines):
diff -r d919d66a6489 -r 6e04b0d7be39 web/Mail/mime.php
--- a/web/Mail/mime.php Tue Sep 22 21:09:18 2015 +0100
+++ b/web/Mail/mime.php Tue Sep 22 21:13:04 2015 +0100
@@ -1,1495 +1,1626 @@
-<?php
-/**
- * The Mail_Mime class is used to create MIME E-mail messages
- *
- * The Mail_Mime class provides an OO interface to create MIME
- * enabled email messages. This way you can create emails that
- * contain plain-text bodies, HTML bodies, attachments, inline
- * images and specific headers.
- *
- * Compatible with PHP versions 4 and 5
- *
- * LICENSE: This LICENSE is in the BSD license style.
- * Copyright (c) 2002-2003, Richard Heyes <[email protected]>
- * Copyright (c) 2003-2006, PEAR <[email protected]>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * - Neither the name of the authors, nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category Mail
- * @package Mail_Mime
- * @author Richard Heyes <[email protected]>
- * @author Tomas V.V. Cox <[email protected]>
- * @author Cipriano Groenendal <[email protected]>
- * @author Sean Coates <[email protected]>
- * @author Aleksander Machniak <[email protected]>
- * @copyright 2003-2006 PEAR <[email protected]>
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Mail_mime
- *
- * This class is based on HTML Mime Mail class from
- * Richard Heyes <[email protected]> which was based also
- * in the mime_mail.class by Tobias Ratschiller <[email protected]>
- * and Sascha Schumann <[email protected]>
- */
-
-
-/**
- * require PEAR
- *
- * This package depends on PEAR to raise errors.
- */
-require_once 'PEAR.php';
-
-/**
- * require Mail_mimePart
- *
- * Mail_mimePart contains the code required to
- * create all the different parts a mail can
- * consist of.
- */
-require_once 'Mail/mimePart.php';
-
-
-/**
- * The Mail_Mime class provides an OO interface to create MIME
- * enabled email messages. This way you can create emails that
- * contain plain-text bodies, HTML bodies, attachments, inline
- * images and specific headers.
- *
- * @category Mail
- * @package Mail_Mime
- * @author Richard Heyes <[email protected]>
- * @author Tomas V.V. Cox <[email protected]>
- * @author Cipriano Groenendal <[email protected]>
- * @author Sean Coates <[email protected]>
- * @copyright 2003-2006 PEAR <[email protected]>
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: @package_version@
- * @link http://pear.php.net/package/Mail_mime
- */
-class Mail_mime
-{
- /**
- * Contains the plain text part of the email
- *
- * @var string
- * @access private
- */
- var $_txtbody;
-
- /**
- * Contains the html part of the email
- *
- * @var string
- * @access private
- */
- var $_htmlbody;
-
- /**
- * list of the attached images
- *
- * @var array
- * @access private
- */
- var $_html_images = array();
-
- /**
- * list of the attachements
- *
- * @var array
- * @access private
- */
- var $_parts = array();
-
- /**
- * Headers for the mail
- *
- * @var array
- * @access private
- */
- var $_headers = array();
-
- /**
- * Build parameters
- *
- * @var array
- * @access private
- */
- var $_build_params = array(
- // What encoding to use for the headers
- // Options: quoted-printable or base64
- 'head_encoding' => 'quoted-printable',
- // What encoding to use for plain text
- // Options: 7bit, 8bit, base64, or quoted-printable
- 'text_encoding' => 'quoted-printable',
- // What encoding to use for html
- // Options: 7bit, 8bit, base64, or quoted-printable
- 'html_encoding' => 'quoted-printable',
- // The character set to use for html
- 'html_charset' => 'ISO-8859-1',
- // The character set to use for text
- 'text_charset' => 'ISO-8859-1',
- // The character set to use for headers
- 'head_charset' => 'ISO-8859-1',
- // End-of-line sequence
- 'eol' => "\r\n",
- // Delay attachment files IO until building the message
- 'delay_file_io' => false
- );
-
- /**
- * Constructor function
- *
- * @param mixed $params Build parameters that change the way the email
- * is built. Should be an associative array.
- * See $_build_params.
- *
- * @return void
- * @access public
- */
- function Mail_mime($params = array())
- {
- // Backward-compatible EOL setting
- if (is_string($params)) {
- $this->_build_params['eol'] = $params;
- } else if (defined('MAIL_MIME_CRLF') && !isset($params['eol'])) {
- $this->_build_params['eol'] = MAIL_MIME_CRLF;
- }
-
- // Update build parameters
- if (!empty($params) && is_array($params)) {
- while (list($key, $value) = each($params)) {
- $this->_build_params[$key] = $value;
- }
- }
- }
-
- /**
- * Set build parameter value
- *
- * @param string $name Parameter name
- * @param string $value Parameter value
- *
- * @return void
- * @access public
- * @since 1.6.0
- */
- function setParam($name, $value)
- {
- $this->_build_params[$name] = $value;
- }
-
- /**
- * Get build parameter value
- *
- * @param string $name Parameter name
- *
- * @return mixed Parameter value
- * @access public
- * @since 1.6.0
- */
- function getParam($name)
- {
- return isset($this->_build_params[$name]) ?
$this->_build_params[$name] : null;
- }
-
- /**
- * Accessor function to set the body text. Body text is used if
- * it's not an html mail being sent or else is used to fill the
- * text/plain part that emails clients who don't support
- * html should show.
- *
- * @param string $data Either a string or
- * the file name with the contents
- * @param bool $isfile If true the first param should be treated
- * as a file name, else as a string (default)
- * @param bool $append If true the text or file is appended to
- * the existing body, else the old body is
- * overwritten
- *
- * @return mixed True on success or PEAR_Error object
- * @access public
- */
- function setTXTBody($data, $isfile = false, $append = false)
- {
- if (!$isfile) {
- if (!$append) {
- $this->_txtbody = $data;
- } else {
- $this->_txtbody .= $data;
- }
- } else {
- $cont = $this->_file2str($data);
- if ($this->_isError($cont)) {
- return $cont;
- }
- if (!$append) {
- $this->_txtbody = $cont;
- } else {
- $this->_txtbody .= $cont;
- }
- }
-
- return true;
- }
-
- /**
- * Get message text body
- *
- * @return string Text body
- * @access public
- * @since 1.6.0
- */
- function getTXTBody()
- {
- return $this->_txtbody;
- }
-
- /**
- * Adds a html part to the mail.
- *
- * @param string $data Either a string or the file name with the
- * contents
- * @param bool $isfile A flag that determines whether $data is a
- * filename, or a string(false, default)
- *
- * @return bool True on success
- * @access public
- */
- function setHTMLBody($data, $isfile = false)
- {
- if (!$isfile) {
- $this->_htmlbody = $data;
- } else {
- $cont = $this->_file2str($data);
- if ($this->_isError($cont)) {
- return $cont;
- }
- $this->_htmlbody = $cont;
- }
-
- return true;
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits