3 * Null implementation of the PEAR Mail interface
9 * Copyright (c) 2010-2017, Phil Kernick
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
23 * 3. Neither the name of the copyright holder nor the names of its
24 * contributors may be used to endorse or promote products derived from
25 * this software without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 * @author Phil Kernick <philk@rotfl.com.au>
42 * @copyright 2010-2017 Phil Kernick
43 * @license http://opensource.org/licenses/BSD-3-Clause New BSD License
45 * @link http://pear.php.net/package/Mail/
49 * Null implementation of the PEAR Mail:: interface.
54 class Mail_null extends Mail {
57 * Implements Mail_null::send() function. Silently discards all
60 * @param mixed $recipients Either a comma-seperated list of recipients
61 * (RFC822 compliant), or an array of recipients,
62 * each RFC822 valid. This may contain recipients not
63 * specified in the headers, for Bcc:, resending
66 * @param array $headers The array of headers to send with the mail, in an
67 * associative array, where the array key is the
68 * header name (ie, 'Subject'), and the array value
69 * is the header value (ie, 'test'). The header
70 * produced from those values would be 'Subject:
73 * @param string $body The full text of the message body, including any
76 * @return mixed Returns true on success, or a PEAR_Error
77 * containing a descriptive error message on
80 public function send($recipients, $headers, $body)