Swift_Mime_MimeEntity::setBody PHP Method

setBody() public method

Set the body content of this entity as a string.
public setBody ( string $body, string $contentType = null )
$body string
$contentType string optional
    public function setBody($body, $contentType = null);

Usage Example

Example #1
0
 /**
  * @param \Swift_Mime_MimeEntity $message
  *
  * @throws \TijsVerkoyen\CssToInlineStyles\Exception
  */
 private function convert(\Swift_Mime_MimeEntity $message)
 {
     if ($message->getContentType() !== 'text/plain') {
         $this->inliner->setCSS('');
         $this->inliner->setHTML($message->getBody());
         $message->setBody($this->inliner->convert());
     }
 }
All Usage Examples Of Swift_Mime_MimeEntity::setBody