Added MimeByteArrayAttachment.

Removed some unused fields in SmtpClient.
This commit is contained in:
Attila Tőkés 2014-02-21 17:12:32 +02:00
parent 058c6bd7ce
commit 95ed484e7e
5 changed files with 34 additions and 5 deletions

View File

@ -27,5 +27,6 @@
#include "mimetext.h"
#include "mimeinlinefile.h"
#include "mimefile.h"
#include "mimebytearrayattachment.h"
#endif // SMTPMIME_H

View File

@ -0,0 +1,13 @@
#include "mimebytearrayattachment.h"
MimeByteArrayAttachment::MimeByteArrayAttachment(const QString& name, const QByteArray &content) :
MimePart()
{
this->cType = "application/octet-stream";
this->cEncoding = Base64;
this->cName = name,
this->content = content;
}
MimeByteArrayAttachment::~MimeByteArrayAttachment() {}

View File

@ -0,0 +1,20 @@
#ifndef MIMEBYTEARRAYATTACHMENT_H
#define MIMEBYTEARRAYATTACHMENT_H
#include "smtpmime_global.h"
#include "mimepart.h"
class SMTP_MIME_EXPORT MimeByteArrayAttachment : public MimePart
{
public:
/* [1] Constructors and Destructors */
MimeByteArrayAttachment(const QString& name, const QByteArray &content);
~MimeByteArrayAttachment();
/* [1] --- */
};
#endif // MIMEBYTEARRAYATTACHMENT_H

View File

@ -30,8 +30,6 @@ SmtpClient::SmtpClient(const QString & host, int port, ConnectionType connection
state(UnconnectedState),
name("localhost"),
authMethod(AuthPlain),
connectionTimeout(5000),
responseTimeout(5000),
isReadyConnected(false),
isAuthenticated(false),
isMailSent(false)

View File

@ -172,9 +172,6 @@ protected:
AuthMethod authMethod;
bool clearUserDataAfterLogin;
int connectionTimeout;
int responseTimeout;
QString responseText;
QString tempResponse;
int responseCode;