diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/mailtransportresource/mailtransportresource.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/examples/mailtransportresource/mailtransportresource.cpp b/examples/mailtransportresource/mailtransportresource.cpp index a6460f1..72fe59d 100644 --- a/examples/mailtransportresource/mailtransportresource.cpp +++ b/examples/mailtransportresource/mailtransportresource.cpp | |||
@@ -81,20 +81,10 @@ public: | |||
81 | } | 81 | } |
82 | 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)) { |
83 | SinkWarning() << "Failed to send message: " << mail; | 83 | SinkWarning() << "Failed to send message: " << mail; |
84 | //Emit failure notification | 84 | emitNotification(Notification::Warning, Notification::TransmissionFailed, "Failed to send message."); |
85 | Sink::Notification n; | ||
86 | n.type = Notification::Warning; | ||
87 | n.message = "Failed to send message."; | ||
88 | n.code = Notification::TransmissionFailed; | ||
89 | emit notify(n); | ||
90 | return KAsync::error("Failed to send the message."); | 85 | return KAsync::error("Failed to send the message."); |
91 | } else { | 86 | } else { |
92 | //Emit success notification | 87 | emitNotification(Notification::Info, Notification::TransmissionSucceeded, "Message successfully sent."); |
93 | Sink::Notification n; | ||
94 | n.type = Notification::Info; | ||
95 | n.message = "Message successfully sent."; | ||
96 | n.code = Notification::TransmissionSucceeded; | ||
97 | emit notify(n); | ||
98 | } | 88 | } |
99 | } | 89 | } |
100 | syncStore().writeValue(mail.identifier(), "sent"); | 90 | syncStore().writeValue(mail.identifier(), "sent"); |