Warning, /pim/ksmtp/Mainpage.dox is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: none
0003 SPDX-License-Identifier: CC0-1.0
0004 */
0005
0006 /*!
0007 * @mainpage KSmtp - a job-based API for interacting with SMTP servers
0008 *
0009 * @section purpose Purpose
0010 *
0011 * This library provides a job-based API for interacting with an SMTP server.
0012 * Its design follows the design KIMAP.
0013 *
0014 * @section desc Description
0015 * Sample usage:
0016 * @code
0017 * void MyClass::login()
0018 * {
0019 * m_session = new KSmtp::Session("smtp.example.com", 587, KSmtp::Session::StartAndWait, this);
0020 *
0021 * // Start authentication
0022 * KSmtp::LoginJob* login = new KSmtp::LoginJob(m_session);
0023 * login->setUseTls(true);
0024 * login->setUserName("example@example.com");
0025 * login->setPassword("password");
0026 * connect(login, SIGNAL(result(KJob*)), this, SLOT(loginResult(KJob*)));
0027 * login->start();
0028 * }
0029 *
0030 * void MyClass::loginResult(KJob* job)
0031 * {
0032 * if (m_session->state() != KSmtp::Session::Authenticated) {
0033 * ... // handle error
0034 * return;
0035 * }
0036 *
0037 * // Create a new KMime::Message
0038 * KMime::Message::Ptr msg(new KMime::Message());
0039 * msg->from()->fromUnicodeString("sender@example.com", "utf-8");
0040 * msg->to()->fromUnicodeString("recipient@example.com", "utf-8");
0041 * msg->subject()->fromUnicodeString("Hi there!", "utf-8");
0042 * msg->contentType()->setMimeType("text/plain");
0043 * msg->contentTransferEncoding()->setEncoding(KMime::Headers::CEquPr);
0044 *
0045 * // Assembles and encodes the message
0046 * msg->assemble();
0047 * const QByteArray content = msg->encodedContent(true) + "\r\n";
0048 *
0049 * // Start sending the message
0050 * KSmtp::SendJob* send = new KSmtp::SendJob(m_session);
0051 * send->setData(content);
0052 * send->setSender("sender@example.com");
0053 * send->setTo("recipient@example.com");
0054 * send->setBcc("hidden-recipient@example.com");
0055 * connect(send, SIGNAL(result(KJob*)), SLOT(sendResult(KJob*)));
0056 * send->start();
0057 * }
0058 * @endcode
0059 *
0060 * @authors
0061 * The major authors of this library are:\n
0062 * Christophe Laveault \<christophe@betterinbox.com\>
0063 *
0064 * @maintainers
0065 * Gregory Schlomoff \<greg@betterinbox.com\>,
0066 *
0067 * @licenses
0068 * @lgpl
0069 */
0070
0071
0072 // DOXYGEN_PROJECTNAME=KSmtp Library