src/Leevel/Mail/Mail.php
public function attachData(string $data, string $name, Closure $callbacks = null): IMail
    {
        $this->makeMessage();

        return $this->callbackAttachment(
            $this->createDataAttachment($data, $name),
            $callbacks
        );
    }
public function attachData(string $data, string $name, Closure $callbacks = null): IMail
    {
        $this->makeMessage();

        return $this->callbackAttachment(
            $this->createDataAttachment($data, $name),
            $callbacks
        );
    }
添加内存内容附件
file_get_content(path).

@param string        $data
@param string        $name
@param null|\Closure $callbacks

@return $this