summaryrefslogtreecommitdiffstats
path: root/examples/mailtransportresource/smtptest.cpp
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/smtptest.cpp
parent71d27b4b016240e4a5ae28c59991317dec2fdcd4 (diff)
downloadsink-890b12ba3b2889dd0d5331534c8c1f22abf4a80b.tar.gz
sink-890b12ba3b2889dd0d5331534c8c1f22abf4a80b.zip
Get mailtransport to work with kolab container.
Diffstat (limited to 'examples/mailtransportresource/smtptest.cpp')
-rw-r--r--examples/mailtransportresource/smtptest.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/mailtransportresource/smtptest.cpp b/examples/mailtransportresource/smtptest.cpp
new file mode 100644
index 0000000..079150f
--- /dev/null
+++ b/examples/mailtransportresource/smtptest.cpp
@@ -0,0 +1,20 @@
1
2#include <QCoreApplication>
3#include <KMime/Message>
4#include "mailtransport.h"
5
6int main(int argc, char *argv[])
7{
8 QCoreApplication app(argc, argv);
9 app.setApplicationName(argv[0]);
10
11 auto args = app.arguments();
12
13 auto msg = KMime::Message::Ptr::create();
14 msg->to(true)->from7BitString("doe2@example.org");
15 msg->from(true)->from7BitString("doe@example.org");
16 msg->subject(true)->from7BitString("Subject");
17 msg->assemble();
18
19 MailTransport::sendMessage(msg, "smtp://kolab:25", "doe@example.org", "Welcome2KolabSystems", QByteArray{}, MailTransport::Options{});
20}