KSMTP
KSmtp - a job-based API for interacting with SMTP servers
Purpose
This library provides a job-based API for interacting with an SMTP server. Its design follows the design KIMAP.
Description
Sample usage:
void MyClass::login()
{
// Start authentication
login->setUseTls(true);
login->setUserName("[email protected]");
login->setPassword("password");
login->start();
}
void MyClass::loginResult(KJob* job)
{
if (m_session->state() != KSmtp::Session::Authenticated) {
... // handle error
return;
}
// Create a new KMime::Message
msg->from()->fromUnicodeString("[email protected]", "utf-8");
msg->to()->fromUnicodeString("[email protected]", "utf-8");
msg->subject()->fromUnicodeString("Hi there!", "utf-8");
msg->contentType()->setMimeType("text/plain");
msg->contentTransferEncoding()->setEncoding(KMime::Headers::CEquPr);
// Assembles and encodes the message
msg->assemble();
// Start sending the message
send->setData(content);
send->setSender("[email protected]");
send->setTo("[email protected]");
send->setBcc("[email protected]");
send->start();
}
- Maintainer(s):
- Gregory Schlomoff <greg@>, bett erinb ox.c om
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:07:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:07:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.