Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Runtime
Commits
00d891ec
Commit
00d891ec
authored
Feb 27, 2022
by
Volker Krause
Browse files
Adapt to upcoming MailTransport changes
See
kmailtransport!13
.
parent
a59e0939
Pipeline
#143798
passed with stage
in 7 minutes and 5 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
agents/maildispatcher/CMakeLists.txt
View file @
00d891ec
...
...
@@ -47,6 +47,7 @@ target_link_libraries(akonadi_maildispatcher_agent
KF5::AkonadiMime
KF5::Mime
KF5::MailTransportAkonadi
KF5::MailTransport
KF5::AkonadiAgentBase
KF5::I18n
KF5::Notifications
...
...
agents/maildispatcher/outboxqueue.cpp
View file @
00d891ec
...
...
@@ -22,6 +22,7 @@
#include <KMime/Message>
#include <MailTransport/TransportManager>
#include <MailTransportAkonadi/DispatchModeAttribute>
#include <MailTransportAkonadi/SentBehaviourAttribute>
#include <MailTransportAkonadi/TransportAttribute>
...
...
@@ -93,7 +94,7 @@ void OutboxQueue::addIfComplete(const Item &item)
const
auto
transportAttribute
=
item
.
attribute
<
TransportAttribute
>
();
Q_ASSERT
(
transportAttribute
);
if
(
transportAttribute
->
transport
(
)
==
nullptr
)
{
if
(
TransportManager
::
self
()
->
transportById
(
transportAttribute
->
transport
Id
(),
false
)
==
nullptr
)
{
qCWarning
(
MAILDISPATCHER_LOG
)
<<
"Item "
<<
item
.
id
()
<<
"has invalid transport."
;
return
;
}
...
...
agents/maildispatcher/sendjob.cpp
View file @
00d891ec
...
...
@@ -53,13 +53,14 @@ void SendJob::doTransport()
// Is it an Akonadi transport or a traditional one?
const
TransportAttribute
*
transportAttribute
=
mItem
.
attribute
<
TransportAttribute
>
();
const
auto
transport
=
TransportManager
::
self
()
->
transportById
(
transportAttribute
->
transportId
(),
false
);
Q_ASSERT
(
transportAttribute
);
if
(
!
transport
Attribute
->
transport
()
)
{
if
(
!
transport
)
{
storeResult
(
false
,
i18n
(
"Could not initiate message transport. Possibly invalid transport."
));
return
;
}
const
TransportType
type
=
transport
Attribute
->
transport
()
->
transportType
();
const
TransportType
type
=
transport
->
transportType
();
if
(
!
type
.
isValid
())
{
storeResult
(
false
,
i18n
(
"Could not send message. Invalid transport."
));
return
;
...
...
@@ -71,7 +72,7 @@ void SendJob::doTransport()
if
(
type
.
isAkonadiResource
())
{
// Send the item directly to the resource that will send it.
mResourceId
=
transport
Attribute
->
transport
()
->
host
();
mResourceId
=
transport
->
host
();
doAkonadiTransport
();
}
else
{
// Use a traditional transport job.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment