summaryrefslogtreecommitdiffstats
path: root/examples/mailtransportresource/mailtransport.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-19 20:09:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-19 20:09:30 +0100
commit890b12ba3b2889dd0d5331534c8c1f22abf4a80b (patch)
treec2af162b884fe8bcd7a6addf55d0473524173046 /examples/mailtransportresource/mailtransport.h
parent71d27b4b016240e4a5ae28c59991317dec2fdcd4 (diff)
downloadsink-890b12ba3b2889dd0d5331534c8c1f22abf4a80b.tar.gz
sink-890b12ba3b2889dd0d5331534c8c1f22abf4a80b.zip
Get mailtransport to work with kolab container.
Diffstat (limited to 'examples/mailtransportresource/mailtransport.h')
-rw-r--r--examples/mailtransportresource/mailtransport.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/mailtransportresource/mailtransport.h b/examples/mailtransportresource/mailtransport.h
index 6cd3452..3ef4a6d 100644
--- a/examples/mailtransportresource/mailtransport.h
+++ b/examples/mailtransportresource/mailtransport.h
@@ -20,9 +20,21 @@
20#pragma once 20#pragma once
21 21
22#include <QByteArray> 22#include <QByteArray>
23#include <QFlag>
23#include <KMime/Message> 24#include <KMime/Message>
24 25
25namespace MailTransport 26namespace MailTransport
26{ 27{
27 bool sendMessage(const KMime::Message::Ptr &message, const QByteArray &server, const QByteArray &username, const QByteArray &password, const QByteArray &cacert); 28 enum Option {
29 UseTls,
30 VerifyPeers
31 };
32 Q_DECLARE_FLAGS(Options, Option);
33
34 /*
35 * For ssl use "smtps://mainserver.example.net
36 * @param cacert: "/path/to/certificate.pem";
37 */
38 bool sendMessage(const KMime::Message::Ptr &message, const QByteArray &server, const QByteArray &username, const QByteArray &password, const QByteArray &cacert, Options flags);
28}; 39};
40Q_DECLARE_OPERATORS_FOR_FLAGS(MailTransport::Options)