mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Fixed bounce-address generation so that it doesn't have a human component to the email address
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63602 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5fb39c998e
commit
22752170fb
@ -124,14 +124,14 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
|
||||
$headers["From"] = validEmailAddr($from);
|
||||
|
||||
// Messages with the X-SilverStripeMessageID header can be tracked
|
||||
if(isset($customheaders["X-SilverStripeMessageID"]) && defined('BOUNCE_EMAIL')) {
|
||||
$bounceAddress = BOUNCE_EMAIL;
|
||||
// Get the human name from the from address, if there is one
|
||||
if(ereg('^([^<>]+)<([^<>])> *$', $from, $parts))
|
||||
$bounceAddress = "$parts[1]<$bounceAddress>";
|
||||
} else {
|
||||
$bounceAddress = $from;
|
||||
}
|
||||
if(isset($customheaders["X-SilverStripeMessageID"]) && defined('BOUNCE_EMAIL')) {
|
||||
$bounceAddress = BOUNCE_EMAIL;
|
||||
} else {
|
||||
$bounceAddress = $from;
|
||||
}
|
||||
|
||||
// Strip the human name from the bounce address
|
||||
if(ereg('^([^<>]*)<([^<>]+)> *$', $bounceAddress, $parts)) $bounceAddress = $parts[2];
|
||||
|
||||
// $headers["Sender"] = $from;
|
||||
$headers["X-Mailer"] = X_MAILER;
|
||||
|
Loading…
x
Reference in New Issue
Block a user