public function addContentToMailer($message, $code, $data, $plainOnly = false)
    {
        if (isset($this->templateCache[$code])) {
            $template = $this->templateCache[$code];
        }
        else {
            $this->templateCache[$code] = $template = MailTemplate::findOrMakeTemplate($code);
        }

        if (!$template) {
            return false;
        }

        $this->addContentToMailerInternal($message, $template, $data, $plainOnly);

        return true;
    }
public function addContentToMailer($message, $code, $data, $plainOnly = false)
    {
        if (isset($this->templateCache[$code])) {
            $template = $this->templateCache[$code];
        }
        else {
            $this->templateCache[$code] = $template = MailTemplate::findOrMakeTemplate($code);
        }

        if (!$template) {
            return false;
        }

        $this->addContentToMailerInternal($message, $template, $data, $plainOnly);

        return true;
    }
public function addContentToMailer ( $ message , $ code , $ data , $ plainOnly = false ) { if ( isset ( $ this -> templateCache [ $ code ] ) ) { $ template = $ this -> templateCache [ $ code ] ; } else { $ this -> templateCache [ $ code ] = $ template = MailTemplate :: findOrMakeTemplate ( $ code ) ; } if ( ! $ template ) { return false ; } $ this -> addContentToMailerInternal ( $ message , $ template , $ data , $ plainOnly ) ; return true ; }
This function hijacks the `addContent` method of the `October\Rain\Mail\Mailer`
class, using the `mailer.beforeAddContent` event.

@param \Illuminate\Mail\Message $message
@param string $code
@param array $data
@param bool $plainOnly Add only plain text content to the message
@return bool
This function hijacks the addContent method of the October \ Rain \ Mail \ Mailer class using the mailer . beforeAddContent event .