mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
always try to set the Sender information; use set Sender, then try using the Sender info possibly supplied with the SMTP Auth info, then use the Profiles identity eMailaddress, if available
This commit is contained in:
parent
9a42ca2fbb
commit
b41730ee15
@ -69,7 +69,21 @@
|
||||
if($ogServer->smtpAuth) {
|
||||
$this->SMTPAuth = true;
|
||||
list($username,$senderadress) = explode(';', $ogServer->username,2);
|
||||
if (isset($senderadress) && !empty($senderadress)) $this->Sender = $senderadress;
|
||||
if (!isset($this->Sender) || empty($this->Sender)) // if there is no Sender info, try to determine one
|
||||
{
|
||||
if (isset($senderadress) && !empty($senderadress)) // thats the senderinfo, that may be part of the
|
||||
{ // SMTP Auth. this one has precedence over other settings
|
||||
$this->Sender = $senderadress;
|
||||
}
|
||||
else // there is no senderinfo with smtp auth, fetch the identities mailaddress, as it should be connected to
|
||||
{ // the active profiles smtp settings
|
||||
$activeMailProfile = $preferences->getIdentity(0); // fetch active identity
|
||||
if (isset($activeMailProfile->emailAddress) && !empty($activeMailProfile->emailAddress))
|
||||
{
|
||||
$this->Sender = $activeMailProfile->emailAddress;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->Username = $username;
|
||||
$this->Password = $ogServer->password;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user