diff options
Diffstat (limited to 'examples/mailtransportresource/mailtransportresource.cpp')
-rw-r--r-- | examples/mailtransportresource/mailtransportresource.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/mailtransportresource/mailtransportresource.cpp b/examples/mailtransportresource/mailtransportresource.cpp index 673fae4..f215643 100644 --- a/examples/mailtransportresource/mailtransportresource.cpp +++ b/examples/mailtransportresource/mailtransportresource.cpp | |||
@@ -59,6 +59,7 @@ public: | |||
59 | SinkLog() << "Mail is already sent: " << mail.identifier(); | 59 | SinkLog() << "Mail is already sent: " << mail.identifier(); |
60 | return KAsync::null(); | 60 | return KAsync::null(); |
61 | } | 61 | } |
62 | emitNotification(Notification::Info, ApplicationDomain::SyncInProgress, "Sending message.", {}, {mail.identifier()}); | ||
62 | const auto data = mail.getMimeMessage(); | 63 | const auto data = mail.getMimeMessage(); |
63 | auto msg = KMime::Message::Ptr::create(); | 64 | auto msg = KMime::Message::Ptr::create(); |
64 | msg->setHead(KMime::CRLFtoLF(data)); | 65 | msg->setHead(KMime::CRLFtoLF(data)); |
@@ -80,10 +81,12 @@ public: | |||
80 | } | 81 | } |
81 | if (!MailTransport::sendMessage(msg, settings.server.toUtf8(), settings.username.toUtf8(), settings.password.toUtf8(), settings.cacert.toUtf8(), options)) { | 82 | if (!MailTransport::sendMessage(msg, settings.server.toUtf8(), settings.username.toUtf8(), settings.password.toUtf8(), settings.cacert.toUtf8(), options)) { |
82 | SinkWarning() << "Failed to send message: " << mail; | 83 | SinkWarning() << "Failed to send message: " << mail; |
83 | emitNotification(Notification::Warning, ApplicationDomain::TransmissionError, "Failed to send message."); | 84 | emitNotification(Notification::Warning, ApplicationDomain::SyncError, "Failed to send message.", {}, {mail.identifier()}); |
85 | emitNotification(Notification::Warning, ApplicationDomain::TransmissionError, "Failed to send message.", {}, {mail.identifier()}); | ||
84 | return KAsync::error("Failed to send the message."); | 86 | return KAsync::error("Failed to send the message."); |
85 | } else { | 87 | } else { |
86 | emitNotification(Notification::Info, ApplicationDomain::TransmissionSuccess, "Message successfully sent."); | 88 | emitNotification(Notification::Info, ApplicationDomain::SyncSuccess, "Message successfully sent.", {}, {mail.identifier()}); |
89 | emitNotification(Notification::Info, ApplicationDomain::TransmissionSuccess, "Message successfully sent.", {}, {mail.identifier()}); | ||
87 | } | 90 | } |
88 | } | 91 | } |
89 | syncStore().writeValue(mail.identifier(), "sent"); | 92 | syncStore().writeValue(mail.identifier(), "sent"); |