luya\components\Mail::setBody PHP Method

setBody() public method

Set the HTML body for the mailer message, if a layout is defined the layout will automatically wrapped about the html body.
public setBody ( string $body ) : Mail
$body string The HTML body message
return Mail
    public function setBody($body)
    {
        $this->getMailer()->Body = $this->wrapLayout($body);
        return $this;
    }

Usage Example

Beispiel #1
0
 public function testLayoutWithoutWrapper()
 {
     $mail = new Mail();
     $mail->layout = false;
     $mail->setBody('CONTENT');
     $this->assertEquals('CONTENT', $mail->mailer->Body);
 }