Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3e5bf6ae authored by Laurent Montel's avatar Laurent Montel 😁

We have an identity but we don't use settings as sent folder

Bug found by David
parent 0e16eba3
......@@ -92,15 +92,29 @@ void IndividualMessageQueueJob::startQueueJob(const QStringList &messageTo, cons
msg->cc()->fromUnicodeString(messageCc.join(QStringLiteral(", ")), "utf-8");
msg->assemble();
mQueueJob = new MailTransport::MessageQueueJob(this);
mQueueJob->setMessage(msg);
mQueueJob->transportAttribute().setTransportId(transportAttribute().transportId());
mQueueJob->sentBehaviourAttribute().setSentBehaviour(sentBehaviourAttribute().sentBehaviour());
mQueueJob->transportAttribute().setTransportId(mIdentity.isNull() ? transportAttribute().transportId() : mIdentity.transport().toInt());
mQueueJob->addressAttribute().setFrom(addressAttribute().from());
mQueueJob->addressAttribute().setTo(to);
mQueueJob->addressAttribute().setCc(cc);
mQueueJob->addressAttribute().setBcc(addressAttribute().bcc());
if (mIdentity.disabledFcc()) {
mQueueJob->sentBehaviourAttribute().setSentBehaviour(MailTransport::SentBehaviourAttribute::Delete);
} else {
const Akonadi::Collection sentCollection(mIdentity.fcc().toLongLong());
if (sentCollection.isValid()) {
mQueueJob->sentBehaviourAttribute().setSentBehaviour(MailTransport::SentBehaviourAttribute::MoveToCollection);
mQueueJob->sentBehaviourAttribute().setMoveToCollection(sentCollection);
} else {
mQueueJob->sentBehaviourAttribute().setSentBehaviour(
MailTransport::SentBehaviourAttribute::MoveToDefaultSentCollection);
}
}
connect(mQueueJob, &MailTransport::MessageQueueJob::finished, this,
&IndividualMessageQueueJob::handleJobFinished);
mQueueJob->start();
......
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