1
0
Fork 0

Merge pull request #4764 from MrPetovan/bug/4755-use-sender-header-invite

Use Sender: header for invite emails
This commit is contained in:
Michael Vogel 2018-04-07 08:31:14 +02:00 committed by GitHub
commit 5af9fa0be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 22 deletions

View file

@ -1047,4 +1047,24 @@ class App
unset($this->config[$uid][$cat][$k]);
}
}
/**
* Generates the site's default sender email address
*
* @return string
*/
public function getSenderEmailAddress()
{
$sender_email = Config::get('config', 'sender_email');
if (empty($sender_email)) {
$hostname = $this->get_hostname();
if (strpos($hostname, ':')) {
$hostname = substr($hostname, 0, strpos($hostname, ':'));
}
$sender_email = L10n::t('noreply') . '@' . $hostname;
}
return $sender_email;
}
}