mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Code formatting fixes to Email
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73650 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
50ca8ff01a
commit
0085a1ad9d
@ -160,11 +160,12 @@ class Email extends ViewableData {
|
||||
}
|
||||
|
||||
public function setBounceHandlerURL( $bounceHandlerURL ) {
|
||||
if( $bounceHandlerURL )
|
||||
if($bounceHandlerURL) {
|
||||
$this->bounceHandlerURL = $bounceHandlerURL;
|
||||
else
|
||||
} else {
|
||||
$this->bounceHandlerURL = $_SERVER['HTTP_HOST'] . Director::baseURL() . 'Email_BounceHandler';
|
||||
}
|
||||
}
|
||||
|
||||
public function attachFile($filename, $attachedFilename = null, $mimetype = null) {
|
||||
$absoluteFileName = Director::getAbsFile($filename);
|
||||
@ -406,6 +407,7 @@ class Email extends ViewableData {
|
||||
if(trim($headers['Cc'])) $headers['Cc'] .= ', ';
|
||||
$headers['Cc'] .= self::$cc_all_emails_to;
|
||||
}
|
||||
|
||||
if(self::$bcc_all_emails_to) {
|
||||
if(trim($headers['Bcc'])) $headers['Bcc'] .= ', ';
|
||||
$headers['Bcc'] .= self::$bcc_all_emails_to;
|
||||
@ -431,9 +433,7 @@ class Email extends ViewableData {
|
||||
|
||||
$this->parseVariables();
|
||||
|
||||
if( empty( $this->from ) ){
|
||||
$this->from = Email::getAdminEmail();
|
||||
}
|
||||
if(empty($this->from)) $this->from = Email::getAdminEmail();
|
||||
|
||||
$this->setBounceHandlerURL( $this->bounceHandlerURL );
|
||||
|
||||
@ -540,7 +540,6 @@ class Email extends ViewableData {
|
||||
self::$bcc_all_emails_to = $emailAddress;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks for RFC822-valid email format.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user