From 3e9fa46b21bd121df1e838523b3934a824ed2156 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 28 Jul 2011 10:49:14 +0000 Subject: [PATCH] only allow to fake the Sender with an Alias Identity, when an emailadmin defined profile is used --- felamimail/inc/class.bocompose.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/felamimail/inc/class.bocompose.inc.php b/felamimail/inc/class.bocompose.inc.php index 9435803238..34c386b9ec 100644 --- a/felamimail/inc/class.bocompose.inc.php +++ b/felamimail/inc/class.bocompose.inc.php @@ -697,8 +697,8 @@ $_mailObject->CharSet = $this->displayCharset; // you need to set the sender, if you work with different identities, since most smtp servers, dont allow // sending in the name of someone else - if ($_identity->id != $activeMailProfile->id) error_log(__METHOD__.__LINE__.' Faking From/SenderInfo for '.$activeMailProfile->emailAddress.' Identitiy to use for sending:'.array2string($_identity)); - $_mailObject->Sender = ($_identity->id<0 ? $_identity->emailAddress : $activeMailProfile->emailAddress); + if ($_identity->id != $activeMailProfile->id) error_log(__METHOD__.__LINE__.' Faking From/SenderInfo for '.$activeMailProfile->emailAddress.' with ID:'.$activeMailProfile->id.'. Identitiy to use for sending:'.array2string($_identity)); + $_mailObject->Sender = ($_identity->id<0 && $activeMailProfile->id < 0 ? $_identity->emailAddress : $activeMailProfile->emailAddress); $_mailObject->From = $_identity->emailAddress; $_mailObject->FromName = $_mailObject->EncodeHeader($_identity->realName); $_mailObject->Priority = $_formData['priority'];