新增邮件发送工具

This commit is contained in:
feiyangqingyun
2019-11-21 14:29:19 +08:00
parent 9da9db4d03
commit a9c472c1da
34 changed files with 2170 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
#include "mimefile.h"
#include <QFileInfo>
MimeFile::MimeFile(QFile *file)
{
this->file = file;
this->cType = "application/octet-stream";
this->cName = QFileInfo(*file).fileName();
this->cEncoding = Base64;
}
MimeFile::~MimeFile()
{
delete file;
}
void MimeFile::prepare()
{
file->open(QIODevice::ReadOnly);
this->content = file->readAll();
file->close();
MimePart::prepare();
}