mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Check for $bounceAddress before using (fixes #3359)
This commit is contained in:
parent
97819b3f21
commit
4d36b97543
@ -224,7 +224,7 @@ class Mailer extends Object {
|
||||
$to = $this->validEmailAddr($to);
|
||||
|
||||
// Try it without the -f option if it fails
|
||||
if(!($result = @mail($to, $subject, $fullBody, $headers, escapeshellarg("-f$bounceAddress")))) {
|
||||
if(!$bounceAddress || !($result = @mail($to, $subject, $fullBody, $headers, escapeshellarg("-f$bounceAddress")))) {
|
||||
$result = mail($to, $subject, $fullBody, $headers);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user