KSMTP

sendjob.h
1 /*
2  SPDX-FileCopyrightText: 2010 BetterInbox <[email protected]>
3  SPDX-FileContributor: Christophe Laveault <[email protected]>
4  SPDX-FileContributor: Gregory Schlomoff <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-or-later
7 */
8 
9 #pragma once
10 
11 #include "ksmtp_export.h"
12 
13 #include "job.h"
14 
15 namespace KSmtp
16 {
17 class SendJobPrivate;
18 /**
19  * @brief The SendJob class
20  */
21 class KSMTP_EXPORT SendJob : public Job
22 {
23  Q_OBJECT
24  Q_DECLARE_PRIVATE(SendJob)
25 
26 public:
27  explicit SendJob(Session *session);
28 
29  /**
30  * Set the sender email address
31  */
32  void setFrom(const QString &from);
33 
34  /**
35  * Add recipients.
36  *
37  */
38  void setTo(const QStringList &to);
39 
40  /**
41  * Add recipients.
42  */
43  void setCc(const QStringList &cc);
44 
45  /**
46  * Add recipients.
47  */
48  void setBcc(const QStringList &bcc);
49 
50  /**
51  * Set the actual message data.
52  */
53  void setData(const QByteArray &data);
54 
55  /**
56  * Returns size of the encoded message data.
57  */
58  [[nodiscard]] int size() const;
59 
60  /**
61  * Set Delivery Status Notification.
62  */
63  void setDeliveryStatusNotification(bool b);
64 
65 protected:
66  void doStart() override;
67  void handleResponse(const ServerResponse &r) override;
68 };
69 }
The Session class.
Definition: session.h:23
The SendJob class.
Definition: sendjob.h:21
The Job class.
Definition: job.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 04:08:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.