public function detectSubject($params) { if ($subject = parent::detectSubject($params)) { return $subject; } $siteNameCandidates = array(Configure::read('Site.name'), Configure::read($this->config . '.siteName'), env('SERVER_NAME'), env('HTTP_HOST'), env('HOST_NAME'), env('COMPUTERNAME')); $siteName = current(array_filter($siteNameCandidates)); if (empty($siteName)) { // detecting failed. $siteName = 'Unknown'; } return sprintf(__d('mailer', '[%s] An error was occurred', true), $siteName); }
/** * Définit les paramètres communs pour les emails UserMailer */ function _prepare() { parent::_prepare(); $this->sendAs = 'text'; }
public function setDebugParameters() { parent::setDebugParameters(); $this->Qdmail->errorDisplay(false); }