Commit f40a5450 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

BUG 442884: Fix DSN support

parent 60f73c69
Pipeline #82497 passed with stage
in 6 minutes and 32 seconds
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(PIM_VERSION "5.18.41")
set(PIM_VERSION "5.18.42")
project(KSMTP VERSION ${PIM_VERSION})
......
......@@ -44,6 +44,7 @@ public:
QStringList m_recipientsCopy;
Status m_status = Idle;
bool m_dsn = false;
};
}
......@@ -171,7 +172,7 @@ void SendJob::handleResponse(const ServerResponse &r)
void SendJobPrivate::sendNextRecipient()
{
q->sendCommand("RCPT TO:<" + m_recipientsCopy.takeFirst().toUtf8() + '>');
q->sendCommand("RCPT TO:<" + m_recipientsCopy.takeFirst().toUtf8() + '>' + (m_dsn ? " NOTIFY=success,failure" : ""));
}
void SendJobPrivate::addRecipients(const QStringList &rcpts)
......@@ -214,3 +215,9 @@ int SendJob::size() const
return d->m_data.size();
}
void SendJob::setDeliveryStatusNotification(bool enabled)
{
Q_D(SendJob);
d->m_dsn = enabled;
}
......@@ -57,6 +57,11 @@ public:
*/
Q_REQUIRED_RESULT int size() const;
/**
* Set Delivery Status Notification.
*/
void setDeliveryStatusNotification(bool b);
protected:
void doStart() override;
void handleResponse(const ServerResponse &r) override;
......
......@@ -231,7 +231,7 @@ void SessionPrivate::sendData(const QByteArray &data)
void SessionPrivate::responseReceived(const ServerResponse &r)
{
// qCDebug(KSMTP_LOG) << "S:: [" << r.code() << "]" << (r.isMultiline() ? "-" : " ") << r.text();
qCDebug(KSMTP_LOG) << "S:: [" << r.code() << "]" << (r.isMultiline() ? "-" : " ") << r.text();
if (m_state == Session::Quitting) {
m_thread->closeSocket();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment