mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
72a069a323
commit
84e01faf1e
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user