core/components/Mail.php
public function compose($subject = null, $body = null)
    {
        $this->cleanup();
        if ($subject !== null) {
            $this->subject($subject);
        }
        if ($body !== null) {
            $this->body($body);
        }
        return $this;
    }
public function compose($subject = null, $body = null)
    {
        $this->cleanup();
        if ($subject !== null) {
            $this->subject($subject);
        }
        if ($body !== null) {
            $this->body($body);
        }
        return $this;
    }
public function compose ( $ subject = null , $ body = null ) { $ this -> cleanup ( ) ; if ( $ subject !== null ) { $ this -> subject ( $ subject ) ; } if ( $ body !== null ) { $ this -> body ( $ body ) ; } return $ this ; }
Compose a new mail message.

Make sure to change mailer object or global variables after composer command, as before it will flush the mailer object.

@param string $subject The subject of the mail
@param string $body The HTML body of the mail message.
@return \luya\components\Mail
Compose a new mail message .