diff options
Diffstat (limited to 'framework/domain/actions/mailactions.cpp')
-rw-r--r-- | framework/domain/actions/mailactions.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/framework/domain/actions/mailactions.cpp b/framework/domain/actions/mailactions.cpp index dab0533e..fde98c85 100644 --- a/framework/domain/actions/mailactions.cpp +++ b/framework/domain/actions/mailactions.cpp | |||
@@ -27,22 +27,3 @@ | |||
27 | 27 | ||
28 | using namespace Kube; | 28 | using namespace Kube; |
29 | 29 | ||
30 | static ActionHandlerHelper sendMailHandler("org.kde.kube.actions.sendmail", | ||
31 | [](Context *context) -> bool { | ||
32 | auto username = context->property("username").value<QByteArray>(); | ||
33 | auto password = context->property("password").value<QByteArray>(); | ||
34 | auto server = context->property("server").value<QByteArray>(); | ||
35 | auto message = context->property("message").value<KMime::Message::Ptr>(); | ||
36 | return !username.isEmpty() && !password.isEmpty() && !server.isEmpty() && message; | ||
37 | }, | ||
38 | [](Context *context) { | ||
39 | auto username = context->property("username").value<QByteArray>(); | ||
40 | auto password = context->property("password").value<QByteArray>(); | ||
41 | auto server = context->property("server").value<QByteArray>(); | ||
42 | //For ssl use "smtps://mainserver.example.net | ||
43 | QByteArray cacert; // = "/path/to/certificate.pem"; | ||
44 | auto message = context->property("message").value<KMime::Message::Ptr>(); | ||
45 | qWarning() << "Sending a mail: "; | ||
46 | MailTransport::sendMessage(message, server, username, password, cacert); | ||
47 | } | ||
48 | ); | ||