Add App->getSenderEmailAddress method

このコミットが含まれているのは:
Hypolite Petovan 2018-04-06 21:47:16 -04:00
コミット a86d1806ae
1個のファイルの変更20行の追加0行の削除

ファイルの表示

@ -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;
}
}