[Patch] new Mail delivery class

From: Date: Thu, 13 Nov 2003 01:20:18 +0000
Subject: [Patch] new Mail delivery class
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23563@lists.php.net to get a copy of this message
I am submitting a new Mail delivery class, Mail_null. This class is very simple, it always returns true for calls to send(). The justification for this class is that it allows mail sending to be disabled, without having to put specific checks all through the code. This is an excerpt from an application that uses this functionality... // Open a mail connector include('Mail.php'); include('Mail/mime.php'); if ($Config['demo_mode']) {
    $mail =& Mail::factory('null');
} else {
    $mail =& Mail::factory('mail');
} In demo mode, mail is disabled. This permits the code to logically send mail, without it actually being delivered. Please consider including this in the mail Mail class. Thanks, Phil.

« previous php.pear.dev (#23563) next »