From ddee9f61be961032c2c051c10e735fb9daeaa0d5 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 28 Jul 2011 10:44:54 +0000 Subject: [PATCH] * eMail: if the identity used for sending is part of the users mainProfile Identities (provided with the mainProfile by ogServer->getAccountEmailAddress ->NOT USER DEFINED<-) then the sender information is set accordingly, as it is assumed that the emailaddresses fetched with getAccountEmailAdress are known to the SMTP Server, thus allowing to be used as Sender/Return-Path --- felamimail/inc/class.bocompose.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.bocompose.inc.php b/felamimail/inc/class.bocompose.inc.php index 7bd04c91d0..6a15d34405 100644 --- a/felamimail/inc/class.bocompose.inc.php +++ b/felamimail/inc/class.bocompose.inc.php @@ -694,7 +694,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 - $_mailObject->Sender = $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'];