Tools\Mailer\Email::profile PHP Method

profile() public method

Ovewrite to allow custom enhancements
public profile ( mixed $config = null ) : string | null | $this
$config mixed
return string | null | $this
    public function profile($config = null)
    {
        if ($config === null) {
            return $this->_profile;
        }
        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->from($fromEmail, $fromName);
        }
        $xMailer = Configure::read('Config.xMailer');
        if ($xMailer) {
            $this->addHeaders(['X-Mailer' => $xMailer]);
        }
        return $this;
    }