Commit 8479539b authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #581 in ZP/z-push from...

Merge pull request #581 in ZP/z-push from bugfix/ZP-1276-error-in-logging-when-sending-email to develop

* commit '2f5fc742':
  ZP-1276 Update Mail library. Released under the Affero GNU General Public License (AGPL) version 3.
  ZP-1276 Error in logging when sending email with imap backend. Released under the Affero GNU General Public License (AGPL) version 3.
parents 79012c94 2f5fc742
......@@ -2,31 +2,33 @@
/**
* internal PHP-mail() implementation of the PEAR Mail:: interface.
*
* PHP versions 4 and 5
* PHP version 5
*
* LICENSE:
*
* Copyright (c) 2010 Chuck Hagenbuch
* Copyright (c) 2010-2017, Chuck Hagenbuch
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* o Redistributions of source code must retain the above copyright
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* o Redistributions in binary form must reproduce the above copyright
*
* 2. 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.
* o The names of the authors may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* 3. Neither the name of the copyright holder 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,
* HOLDER 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
......@@ -37,19 +39,19 @@
* @category Mail
* @package Mail
* @author Chuck Hagenbuch <chuck@horde.org>
* @copyright 2010 Chuck Hagenbuch
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: mail.php 294747 2010-02-08 08:18:33Z clockwerx $
* @copyright 2010-2017 Chuck Hagenbuch
* @license http://opensource.org/licenses/BSD-3-Clause New BSD License
* @version CVS: $Id$
* @link http://pear.php.net/package/Mail/
*/
/**
/**
* Z-Push changes
*
* removed PEAR dependency by implementing own raiseError()
*
* Reference implementation used:
* http://download.pear.php.net/package/Mail-1.2.0.tgz
* http://download.pear.php.net/package/Mail-1.4.1.tgz
*
*
*/
......@@ -57,7 +59,7 @@
/**
* internal PHP-mail() implementation of the PEAR Mail:: interface.
* @package Mail
* @version $Revision: 294747 $
* @version $Revision$
*/
class Mail_mail extends Mail {
......@@ -75,7 +77,7 @@ class Mail_mail extends Mail {
*
* @param array $params Extra arguments for the mail() function.
*/
function __construct($params = null)
public function __construct($params = null)
{
// The other mail implementations accept parameters as arrays.
// In the interest of being consistent, explode an array into
......@@ -120,10 +122,8 @@ class Mail_mail extends Mail {
* @return mixed Returns true on success, or a PEAR_Error
* containing a descriptive error message on
* failure.
*
* @access public
*/
function send($recipients, $headers, $body)
public function send($recipients, $headers, $body)
{
if (!is_array($headers)) {
return Mail_mail::raiseError('$headers must be an array');
......
......@@ -6,27 +6,29 @@
*
* LICENSE:
*
* Copyright (c) 2010, Chuck Hagenbuch
* Copyright (c) 2010-2017, Chuck Hagenbuch & Jon Parise
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* o Redistributions of source code must retain the above copyright
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* o Redistributions in binary form must reproduce the above copyright
*
* 2. 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.
* o The names of the authors may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* 3. Neither the name of the copyright holder 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,
* HOLDER 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
......@@ -38,19 +40,19 @@
* @package Mail
* @author Jon Parise <jon@php.net>
* @author Chuck Hagenbuch <chuck@horde.org>
* @copyright 2010 Chuck Hagenbuch
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @copyright 2010-2017 Chuck Hagenbuch
* @license http://opensource.org/licenses/BSD-3-Clause New BSD License
* @version CVS: $Id$
* @link http://pear.php.net/package/Mail/
*/
/**
/**
* Z-Push changes
*
* removed PEAR dependency by implementing own raiseError()
*
* Reference implementation used:
* http://download.pear.php.net/package/Mail-1.2.0.tgz
* http://download.pear.php.net/package/Mail-1.4.1.tgz
*
*
*/
......@@ -59,7 +61,7 @@
* Sendmail implementation of the PEAR Mail:: interface.
* @access public
* @package Mail
* @version $Revision: 294744 $
* @version $Revision$
*/
class Mail_sendmail extends Mail {
......@@ -93,9 +95,8 @@ class Mail_sendmail extends Mail {
*
* @param array $params Hash containing any parameters different from the
* defaults.
* @access public
*/
function __construct($params)
public function __construct($params)
{
if (isset($params['sendmail_path'])) {
$this->sendmail_path = $params['sendmail_path'];
......@@ -139,9 +140,8 @@ class Mail_sendmail extends Mail {
* @return mixed Returns true on success, or a PEAR_Error
* containing a descriptive error message on
* failure.
* @access public
*/
function send($recipients, $headers, $body)
public function send($recipients, $headers, $body)
{
if (!is_array($headers)) {
return Mail_sendmail::raiseError('$headers must be an array');
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment