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("example@example.com");
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("sender@example.com", "utf-8");
msg->to()->fromUnicodeString("recipient@example.com", "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("sender@example.com");
send->setTo("recipient@example.com");
send->setBcc("hidden-recipient@example.com");
send->start();
}
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
- Maintainer(s)
- Gregory Schlomoff <greg@.nosp@m.bett.nosp@m.erinb.nosp@m.ox.c.nosp@m.om>,
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.