/** * Returns a formatted site emailaddress * * @param ElggSite $site the site to get the emailaddress from * * @return string */ protected function getSiteEmailAddress(ElggSite $site) { $site_from = ''; if ($site->email) { if ($site->name) { $site_from = $site->name . " <" . $site->email . ">"; } else { $site_from = $site->email; } } else { // no site email, so make one up if ($site->name) { $site_from = $site->name . " <noreply@" . $site->getDomain() . ">"; } else { $site_from = "noreply@" . $site->getDomain(); } } return $site_from; }