File indexing completed on 2024-05-26 05:27:50

0001 
0002 #include <QCoreApplication>
0003 #include <KMime/Message>
0004 #include "mailtransport.h"
0005 
0006 int main(int argc, char *argv[])
0007 {
0008     QCoreApplication app(argc, argv);
0009     app.setApplicationName(argv[0]);
0010 
0011     auto args = app.arguments();
0012 
0013     auto msg = KMime::Message::Ptr::create();
0014     msg->to(true)->from7BitString("doe2@example.org");
0015     msg->from(true)->from7BitString("doe@example.org");
0016     msg->subject(true)->from7BitString("Subject");
0017     msg->assemble();
0018 
0019     MailTransport::sendMessage(msg, "smtp://kolab:25", "doe@example.org", "Welcome2KolabSystems", QByteArray{}, MailTransport::Options{});
0020 }