mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 10:27:52 +02:00
"modified to use the non-prefered sender-address if the prefered one is not set/existing"
This commit is contained in:
parent
1828683be2
commit
86870ce4d7
@ -415,23 +415,25 @@ class bo_tracking
|
|||||||
/**
|
/**
|
||||||
* Get sender address
|
* Get sender address
|
||||||
*
|
*
|
||||||
|
* The default implementation prefers depending on the prefer_user_as_sender class-var the user over
|
||||||
|
* what is returned by get_config('sender').
|
||||||
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @param array $old
|
* @param array $old
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_sender($data,$old)
|
function get_sender($data,$old)
|
||||||
{
|
{
|
||||||
if ($this->prefer_user_as_sender && $this->user && ($email = $GLOBALS['egw']->accounts->id2name($this->user,'account_email')))
|
$sender = $this->get_config('sender',$data,$old);
|
||||||
|
|
||||||
|
if (($this->prefer_user_as_sender || !$sender) && $this->user &&
|
||||||
|
($email = $GLOBALS['egw']->accounts->id2name($this->user,'account_email')))
|
||||||
{
|
{
|
||||||
$name = $GLOBALS['egw']->accounts->id2name($this->user,'account_fullname');
|
$name = $GLOBALS['egw']->accounts->id2name($this->user,'account_fullname');
|
||||||
|
|
||||||
return $name ? $name.' <'.$email.'>' : $email;
|
return $name ? $name.' <'.$email.'>' : $email;
|
||||||
}
|
}
|
||||||
if (($sender = $this->get_config('sender',$data,$old)))
|
return $sender ? $sender : 'eGroupWare '.lang($this->app).' <noreply@'.$GLOBALS['egw_info']['server']['mail_suffix'];
|
||||||
{
|
|
||||||
return $sender;
|
|
||||||
}
|
|
||||||
return 'eGroupWare '.lang($this->app).' <noreply@'.$GLOBALS['egw_info']['server']['mail_suffix'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user