Refactored newsletter system to put recipient selection and form-fieldset generation into the NewsletterType class, to allow for subclassing NewsletterType to create special system newsletters. [see oriwave2 for an example]

Removed a number of notice-level errors.
Allowed for BOUNCE_EMAIL to not exist and bounce-handling to be disabled.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40963 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2007-08-28 01:55:45 +00:00
parent 72a069a323
commit 84e01faf1e

View File

@ -469,7 +469,7 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
$headers["From"] = validEmailAddr($from); $headers["From"] = validEmailAddr($from);
// Messages with the X-SilverStripeMessageID header can be tracked // Messages with the X-SilverStripeMessageID header can be tracked
if(isset($customheaders["X-SilverStripeMessageID"])) { if(isset($customheaders["X-SilverStripeMessageID"]) && defined('BOUNCE_EMAIL')) {
$bounceAddress = BOUNCE_EMAIL; $bounceAddress = BOUNCE_EMAIL;
// Get the human name from the from address, if there is one // Get the human name from the from address, if there is one
if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts)) if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts))
@ -559,7 +559,7 @@ function plaintextEmail($to, $from, $subject, $plainContent, $attachedFiles, $cu
$headers["From"] = validEmailAddr($from); $headers["From"] = validEmailAddr($from);
// Messages with the X-SilverStripeMessageID header can be tracked // Messages with the X-SilverStripeMessageID header can be tracked
if(isset($customheaders["X-SilverStripeMessageID"])) { if(isset($customheaders["X-SilverStripeMessageID"]) && defined('BOUNCE_EMAIL')) {
$bounceAddress = BOUNCE_EMAIL; $bounceAddress = BOUNCE_EMAIL;
// Get the human name from the from address, if there is one // Get the human name from the from address, if there is one
if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts)) if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts))