Move "App::getSenderEmailAddress()" to "Emailer::getSiteEmailAddress()"
This commit is contained in:
parent
206b53477e
commit
0e13428210
5 changed files with 45 additions and 41 deletions
21
src/App.php
21
src/App.php
|
@ -242,27 +242,6 @@ class App
|
|||
$this->baseURL->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the site's default sender email address
|
||||
*
|
||||
* @return string
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function getSenderEmailAddress()
|
||||
{
|
||||
$sender_email = $this->config->get('config', 'sender_email');
|
||||
if (empty($sender_email)) {
|
||||
$hostname = $this->baseURL->getHostname();
|
||||
if (strpos($hostname, ':')) {
|
||||
$hostname = substr($hostname, 0, strpos($hostname, ':'));
|
||||
}
|
||||
|
||||
$sender_email = 'noreply@' . $hostname;
|
||||
}
|
||||
|
||||
return $sender_email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current theme name. May be overriden by the mobile theme name.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue