public function setContent($resource, $charset = MailMimeParser::DEFAULT_CHARSET)
    {
        $stream = Psr7\stream_for($resource);
        $this->attachContentStream($stream, $charset);
        // this->onChange called in attachContentStream
    }
public function setContent($resource, $charset = MailMimeParser::DEFAULT_CHARSET)
    {
        $stream = Psr7\stream_for($resource);
        $this->attachContentStream($stream, $charset);
        // this->onChange called in attachContentStream
    }
public function setContent ( $ resource , $ charset = MailMimeParser :: DEFAULT_CHARSET ) { $ stream = Psr7 \ stream_for ( $ resource ) ; $ this -> attachContentStream ( $ stream , $ charset ) ; // this->onChange called in attachContentStream }
Sets the content of the part to the passed resource.

@param string|resource|StreamInterface $resource
@param string $charset
Sets the content of the part to the passed resource .