• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

mailtransport

  • mailtransport
  • smtp
smtpsession.h
1/*
2 Copyright (c) 2010 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef MAILTRANSPORT_SMTPSESSION_H
21#define MAILTRANSPORT_SMTPSESSION_H
22#include <qobject.h>
23#include <ktcpsocket.h>
24
25class QIODevice;
26class KUrl;
27
28namespace MailTransport {
29
30class SmtpSessionPrivate;
31
33class SmtpSession : public QObject
34{
35 Q_OBJECT
36 public:
37 explicit SmtpSession( QObject *parent = 0 );
38 ~SmtpSession();
39
41 void connectToHost( const KUrl &url );
42
44 void disconnectFromHost( bool nice = true );
45
47 void setSaslMethod( const QString &method );
48
50 void setUseTLS( bool useTLS );
51
53 void sendMessage( const KUrl &destination, QIODevice *data );
54
56 QString errorMessage() const;
57
58 Q_SIGNALS:
60 void result( MailTransport::SmtpSession *session );
61
62 private:
63 friend class SmtpSessionPrivate;
64 SmtpSessionPrivate * const d;
65 Q_PRIVATE_SLOT( d, void socketConnected() )
66 Q_PRIVATE_SLOT( d, void receivedNewData() )
67 Q_PRIVATE_SLOT( d, void socketError(KTcpSocket::Error) )
68 Q_PRIVATE_SLOT( d, void socketDisconnected() )
69};
70
71}
72
73#endif
MailTransport::SmtpSession
Connection to an SMTP server.
Definition smtpsession.h:34
MailTransport::SmtpSession::result
void result(MailTransport::SmtpSession *session)
Emitted when an email transfer has been completed.
MailTransport::SmtpSession::setUseTLS
void setUseTLS(bool useTLS)
Enable TLS encryption.
Definition smtpsession.cpp:574
MailTransport::SmtpSession::disconnectFromHost
void disconnectFromHost(bool nice=true)
Close the connection to the SMTP server.
Definition smtpsession.cpp:585
MailTransport::SmtpSession::setSaslMethod
void setSaslMethod(const QString &method)
Sets the SASL method used for authentication.
Definition smtpsession.cpp:569
MailTransport::SmtpSession::sendMessage
void sendMessage(const KUrl &destination, QIODevice *data)
Send a message.
Definition smtpsession.cpp:602
MailTransport::SmtpSession::errorMessage
QString errorMessage() const
Returns the error nmeesage, if any.
Definition smtpsession.cpp:625
MailTransport::SmtpSession::connectToHost
void connectToHost(const KUrl &url)
Open connection to host.
Definition smtpsession.cpp:579
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailtransport

Skip menu "mailtransport"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal