| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * Null implementation of the PEAR Mail interface |
|---|
| 4 | * |
|---|
| 5 | * PHP versions 4 and 5 |
|---|
| 6 | * |
|---|
| 7 | * LICENSE: |
|---|
| 8 | * |
|---|
| 9 | * Copyright (c) 2010 Phil Kernick |
|---|
| 10 | * All rights reserved. |
|---|
| 11 | * |
|---|
| 12 | * Redistribution and use in source and binary forms, with or without |
|---|
| 13 | * modification, are permitted provided that the following conditions |
|---|
| 14 | * are met: |
|---|
| 15 | * |
|---|
| 16 | * o Redistributions of source code must retain the above copyright |
|---|
| 17 | * notice, this list of conditions and the following disclaimer. |
|---|
| 18 | * o Redistributions in binary form must reproduce the above copyright |
|---|
| 19 | * notice, this list of conditions and the following disclaimer in the |
|---|
| 20 | * documentation and/or other materials provided with the distribution. |
|---|
| 21 | * o The names of the authors may not be used to endorse or promote |
|---|
| 22 | * products derived from this software without specific prior written |
|---|
| 23 | * permission. |
|---|
| 24 | * |
|---|
| 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|---|
| 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|---|
| 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|---|
| 28 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|---|
| 29 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|---|
| 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|---|
| 31 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|---|
| 32 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|---|
| 33 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|---|
| 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|---|
| 35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 36 | * |
|---|
| 37 | * @category Mail |
|---|
| 38 | * @package Mail |
|---|
| 39 | * @author Phil Kernick <[email protected]> |
|---|
| 40 | * @copyright 2010 Phil Kernick |
|---|
| 41 | * @license http://opensource.org/licenses/bsd-license.php New BSD License |
|---|
| 42 | * @version CVS: $Id$ |
|---|
| 43 | * @link http://pear.php.net/package/Mail/ |
|---|
| 44 | */ |
|---|
| 45 | |
|---|
| 46 | /** |
|---|
| 47 | * Null implementation of the PEAR Mail:: interface. |
|---|
| 48 | * @access public |
|---|
| 49 | * @package Mail |
|---|
| 50 | * @version $Revision$ |
|---|
| 51 | */ |
|---|
| 52 | class Mail_null extends Mail { |
|---|
| 53 | |
|---|
| 54 | /** |
|---|
| 55 | * Implements Mail_null::send() function. Silently discards all |
|---|
| 56 | * mail. |
|---|
| 57 | * |
|---|
| 58 | * @param mixed $recipients Either a comma-seperated list of recipients |
|---|
| 59 | * (RFC822 compliant), or an array of recipients, |
|---|
| 60 | * each RFC822 valid. This may contain recipients not |
|---|
| 61 | * specified in the headers, for Bcc:, resending |
|---|
| 62 | * messages, etc. |
|---|
| 63 | * |
|---|
| 64 | * @param array $headers The array of headers to send with the mail, in an |
|---|
| 65 | * associative array, where the array key is the |
|---|
| 66 | * header name (ie, 'Subject'), and the array value |
|---|
| 67 | * is the header value (ie, 'test'). The header |
|---|
| 68 | * produced from those values would be 'Subject: |
|---|
| 69 | * test'. |
|---|
| 70 | * |
|---|
| 71 | * @param string $body The full text of the message body, including any |
|---|
| 72 | * Mime parts, etc. |
|---|
| 73 | * |
|---|
| 74 | * @return mixed Returns true on success, or a PEAR_Error |
|---|
| 75 | * containing a descriptive error message on |
|---|
| 76 | * failure. |
|---|
| 77 | * @access public |
|---|
| 78 | */ |
|---|
| 79 | function send($recipients, $headers, $body) |
|---|
| 80 | { |
|---|
| 81 | return true; |
|---|
| 82 | } |
|---|
| 83 | |
|---|
| 84 | } |
|---|