mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41:10 +01:00
use smpt-username as sender, if available, but only if it is a full email address
This commit is contained in:
parent
874be20a6c
commit
bf990975a7
@ -60,7 +60,9 @@ class send extends egw_mailer
|
|||||||
$this->Username = $account->acc_smtp_username;
|
$this->Username = $account->acc_smtp_username;
|
||||||
$this->Password = $account->acc_smtp_password;
|
$this->Password = $account->acc_smtp_password;
|
||||||
$this->defaultDomain = $account->acc_domain;
|
$this->defaultDomain = $account->acc_domain;
|
||||||
$this->Sender = $account->acc_smtp_username?$account->acc_smtp_username:emailadmin_account::rfc822($account);
|
// use smpt-username as sender, if available, but only if it is a full email address
|
||||||
|
$this->Sender = $account->acc_smtp_username && strpos($account->acc_smtp_username, '@') !== false ?
|
||||||
|
$account->acc_smtp_username : $account->acc_ident_email;
|
||||||
|
|
||||||
$this->Hostname = $GLOBALS['egw_info']['server']['hostname'];
|
$this->Hostname = $GLOBALS['egw_info']['server']['hostname'];
|
||||||
|
|
||||||
@ -82,7 +84,6 @@ class send extends egw_mailer
|
|||||||
|
|
||||||
$this->FromName = $GLOBALS['egw_info']['user']['account_fullname'];
|
$this->FromName = $GLOBALS['egw_info']['user']['account_fullname'];
|
||||||
$this->From = $GLOBALS['egw_info']['user']['account_email'];
|
$this->From = $GLOBALS['egw_info']['user']['account_email'];
|
||||||
$this->Sender = '';
|
|
||||||
|
|
||||||
$this->AddCustomHeader('X-Mailer:eGroupWare (http://www.eGroupWare.org)');
|
$this->AddCustomHeader('X-Mailer:eGroupWare (http://www.eGroupWare.org)');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user