|
|
@ -53,7 +53,9 @@ |
|
|
|
namespace |
|
|
|
namespace |
|
|
|
{ |
|
|
|
{ |
|
|
|
const short DEFAULT_PORT = 25; |
|
|
|
const short DEFAULT_PORT = 25; |
|
|
|
|
|
|
|
#ifndef QT_NO_OPENSSL |
|
|
|
const short DEFAULT_PORT_SSL = 465; |
|
|
|
const short DEFAULT_PORT_SSL = 465; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
QByteArray hmacMD5(QByteArray key, const QByteArray &msg) |
|
|
|
QByteArray hmacMD5(QByteArray key, const QByteArray &msg) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -98,12 +100,12 @@ Smtp::Smtp(QObject *parent) |
|
|
|
, m_authType(AuthPlain) |
|
|
|
, m_authType(AuthPlain) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static bool needToRegisterMetaType = true; |
|
|
|
static bool needToRegisterMetaType = true; |
|
|
|
|
|
|
|
|
|
|
|
if (needToRegisterMetaType) { |
|
|
|
if (needToRegisterMetaType) { |
|
|
|
qRegisterMetaType<QAbstractSocket::SocketError>(); |
|
|
|
qRegisterMetaType<QAbstractSocket::SocketError>(); |
|
|
|
needToRegisterMetaType = false; |
|
|
|
needToRegisterMetaType = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifndef QT_NO_OPENSSL |
|
|
|
#ifndef QT_NO_OPENSSL |
|
|
|
m_socket = new QSslSocket(this); |
|
|
|
m_socket = new QSslSocket(this); |
|
|
|
#else |
|
|
|
#else |
|
|
|