yii\mail\MessageInterface::attachContent PHP Method

attachContent() public method

Attach specified content as file for the email message.
public attachContent ( string $content, array $options = [] )
$content string attachment file content.
$options array options for embed file. Valid options are: - fileName: name, which should be used to attach file. - contentType: attached file MIME type.
    public function attachContent($content, array $options = []);