src/Mailer/Email.php
public function setProfile($config) {
		if (!is_array($config)) {
			$config = (string)$config;
		}
		$this->_applyConfig($config);

		$fromEmail = Configure::read('Config.systemEmail');
		if ($fromEmail) {
			$fromName = Configure::read('Config.systemName');
		} else {
			$fromEmail = Configure::read('Config.adminEmail');
			$fromName = Configure::read('Config.adminName');
		}
		if ($fromEmail) {
			$this->setFrom($fromEmail, $fromName);
		}

		$xMailer = Configure::read('Config.xMailer');
		if ($xMailer) {
			$this->addHeaders(['X-Mailer' => $xMailer]);
		}

		return $this;
	}
public function setProfile($config) {
		if (!is_array($config)) {
			$config = (string)$config;
		}
		$this->_applyConfig($config);

		$fromEmail = Configure::read('Config.systemEmail');
		if ($fromEmail) {
			$fromName = Configure::read('Config.systemName');
		} else {
			$fromEmail = Configure::read('Config.adminEmail');
			$fromName = Configure::read('Config.adminName');
		}
		if ($fromEmail) {
			$this->setFrom($fromEmail, $fromName);
		}

		$xMailer = Configure::read('Config.xMailer');
		if ($xMailer) {
			$this->addHeaders(['X-Mailer' => $xMailer]);
		}

		return $this;
	}
public function setProfile ( $ config ) { if ( ! is_array ( $ config ) ) { $ config = ( string ) $ config ; } $ this -> _applyConfig ( $ config ) ; $ fromEmail = Configure :: read ( 'Config.systemEmail' ) ; if ( $ fromEmail ) { $ fromName = Configure :: read ( 'Config.systemName' ) ; } else { $ fromEmail = Configure :: read ( 'Config.adminEmail' ) ; $ fromName = Configure :: read ( 'Config.adminName' ) ; } if ( $ fromEmail ) { $ this -> setFrom ( $ fromEmail , $ fromName ) ; } $ xMailer = Configure :: read ( 'Config.xMailer' ) ; if ( $ xMailer ) { $ this -> addHeaders ( [ 'X-Mailer' => $ xMailer ] ) ; } return $ this ; }
Ovewrite to allow custom enhancements

@param array|string $config
@return $this
Ovewrite to allow custom enhancements