diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/mailtransportresource/mailtransportresource.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/mailtransportresource/mailtransportresource.cpp b/examples/mailtransportresource/mailtransportresource.cpp index fa7eba4..cd7f4a7 100644 --- a/examples/mailtransportresource/mailtransportresource.cpp +++ b/examples/mailtransportresource/mailtransportresource.cpp | |||
@@ -81,7 +81,18 @@ 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 | ||
85 | Sink::Notification n; | ||
86 | n.type = Notification::Warning; | ||
87 | n.message = "Failed to send message."; | ||
88 | emit notify(n); | ||
84 | return KAsync::error("Failed to send the message."); | 89 | return KAsync::error("Failed to send the message."); |
90 | } else { | ||
91 | //Emit success notification | ||
92 | Sink::Notification n; | ||
93 | n.type = Notification::Info; | ||
94 | n.message = "Message successfully sent."; | ||
95 | emit notify(n); | ||
85 | } | 96 | } |
86 | } | 97 | } |
87 | syncStore().writeValue(mail.identifier(), "sent"); | 98 | syncStore().writeValue(mail.identifier(), "sent"); |