Added MimeByteArrayAttachment.
Removed some unused fields in SmtpClient.
This commit is contained in:
parent
058c6bd7ce
commit
95ed484e7e
@ -27,5 +27,6 @@
|
|||||||
#include "mimetext.h"
|
#include "mimetext.h"
|
||||||
#include "mimeinlinefile.h"
|
#include "mimeinlinefile.h"
|
||||||
#include "mimefile.h"
|
#include "mimefile.h"
|
||||||
|
#include "mimebytearrayattachment.h"
|
||||||
|
|
||||||
#endif // SMTPMIME_H
|
#endif // SMTPMIME_H
|
||||||
|
13
src/mimebytearrayattachment.cpp
Normal file
13
src/mimebytearrayattachment.cpp
Normal 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() {}
|
||||||
|
|
20
src/mimebytearrayattachment.h
Normal file
20
src/mimebytearrayattachment.h
Normal 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
|
@ -30,8 +30,6 @@ SmtpClient::SmtpClient(const QString & host, int port, ConnectionType connection
|
|||||||
state(UnconnectedState),
|
state(UnconnectedState),
|
||||||
name("localhost"),
|
name("localhost"),
|
||||||
authMethod(AuthPlain),
|
authMethod(AuthPlain),
|
||||||
connectionTimeout(5000),
|
|
||||||
responseTimeout(5000),
|
|
||||||
isReadyConnected(false),
|
isReadyConnected(false),
|
||||||
isAuthenticated(false),
|
isAuthenticated(false),
|
||||||
isMailSent(false)
|
isMailSent(false)
|
||||||
|
@ -172,9 +172,6 @@ protected:
|
|||||||
AuthMethod authMethod;
|
AuthMethod authMethod;
|
||||||
bool clearUserDataAfterLogin;
|
bool clearUserDataAfterLogin;
|
||||||
|
|
||||||
int connectionTimeout;
|
|
||||||
int responseTimeout;
|
|
||||||
|
|
||||||
QString responseText;
|
QString responseText;
|
||||||
QString tempResponse;
|
QString tempResponse;
|
||||||
int responseCode;
|
int responseCode;
|
||||||
|
Loading…
Reference in New Issue
Block a user