Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
2f5fc742
Commit
2f5fc742
authored
Aug 24, 2017
by
Bart Vullings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-1276 Update Mail library. Released under the Affero GNU General Public License (AGPL) version 3.
parent
45ab1bbc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
115 deletions
+109
-115
mail.php
src/backend/imap/Mail/mail.php
+22
-22
sendmail.php
src/backend/imap/Mail/sendmail.php
+19
-19
smtp.php
src/backend/imap/Mail/smtp.php
+68
-74
No files found.
src/backend/imap/Mail/mail.php
View file @
2f5fc742
...
...
@@ -2,31 +2,33 @@
/**
* internal PHP-mail() implementation of the PEAR Mail:: interface.
*
* PHP version
s 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
*
OWN
ER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
*
HOLD
ER 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'
);
...
...
src/backend/imap/Mail/sendmail.php
View file @
2f5fc742
...
...
@@ -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
*
OWN
ER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
*
HOLD
ER 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'
);
...
...
src/backend/imap/Mail/smtp.php
View file @
2f5fc742
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment