MailTransport

smtpjob.h
1 /*
2  SPDX-FileCopyrightText: 2007 Volker Krause <[email protected]>
3 
4  Based on KMail code by:
5  SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef MAILTRANSPORT_SMTPJOB_H
11 #define MAILTRANSPORT_SMTPJOB_H
12 
13 #include <transportjob.h>
14 #include <KSMTP/Session>
15 
16 namespace KIO {
17 class Job;
18 class Slave;
19 }
20 
21 namespace KGAPI2 {
22 class AccountPromise;
23 }
24 
25 class SmtpJobPrivate;
26 
27 namespace MailTransport {
38 class SmtpJob : public TransportJob
39 {
40  Q_OBJECT
41 public:
47  explicit SmtpJob(Transport *transport, QObject *parent = nullptr);
48 
52  ~SmtpJob() override;
53 
54 protected:
55  void doStart() override;
56  bool doKill() override;
57 
58 protected Q_SLOTS:
59  void slotResult(KJob *job) override;
60  void sessionStateChanged(KSmtp::Session::State state);
61 
62 private:
63  void startPasswordRetrieval(bool forceRefresh = false);
64  void onTokenRequestFinished(KGAPI2::AccountPromise *result);
65  void startSmtpJob();
66  void startLoginJob();
67  void startSendJob();
68 
69 private:
70  friend class ::SmtpJobPrivate;
71  SmtpJobPrivate *const d;
72 };
73 } // namespace MailTransport
74 
75 #endif // MAILTRANSPORT_SMTPJOB_H
Mail transport job for SMTP.
Definition: smtpjob.h:38
Abstract base class for all mail transport jobs.
Definition: transportjob.h:27
Represents the settings of a specific mail transport.
Definition: transport.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 23:17:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.