Skip to content

Commit

Permalink
Merge branch 'MDL-48899-27' of git://github.com/andrewnicols/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_27_STABLE
  • Loading branch information
David Monllao committed Feb 24, 2015
2 parents 0eaac55 + 40c809b commit 938d6e9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/phpmailer/moodle_phpmailer.php
Expand Up @@ -162,4 +162,22 @@ public function postSend() {
return parent::postSend();
}
}

/**
* Get the server hostname.
* Returns the host part of the wwwroot.
*
* @access protected
* @return string
*/
protected function serverHostname() {
global $CFG;

$hostname = parent::serverHostname();
if ($hostname === 'localhost.localdomain') {
$urlinfo = parse_url($CFG->wwwroot);
$hostname = $urlinfo['host'];
}
return $hostname;
}
}

0 comments on commit 938d6e9

Please sign in to comment.