/** * Set the body of this entity, either as a string, or as an instance of * {@link Swift_OutputByteStream}. * * @param mixed $body * @param string $contentType optional * @param string $charset optional */ public function setBody($body, $contentType = null, $charset = null) { parent::setBody($body, $contentType); if (isset($charset)) { $this->setCharset($charset); } return $this; }
/** * Set the body of this entity, either as a string, or as an instance of * {@link Swift_OutputByteStream}. * * @param mixed $body * @param string $contentType optional * @param string $charset optional * * @return Swift_Mime_MimePart */ public function setBody($body, $contentType = null, $charset = null) { if (isset($charset)) { $this->setCharset($charset); } $body = $this->_convertString($body); parent::setBody($body, $contentType); return $this; }