yii\mail\MessageInterface::attach PHP Method

attach() public method

Attaches existing file to the email message.
public attach ( string $fileName, array $options = [] )
$fileName string full file name
$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 attach($fileName, array $options = []);