Projet Bee-Honey't  1.0
BTS SN 2019
mimemessage.h
Aller à la documentation de ce fichier.
1 /*
2  Copyright (c) 2011-2012 - Tőkés Attila
3  Copyright (C) 2015 Daniel Nicoletti <dantti12@gmail.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  See the LICENSE file for more details.
16 */
17 
18 #ifndef MIMEMESSAGE_H
19 #define MIMEMESSAGE_H
20 
21 #include "mimepart.h"
22 #include "mimemultipart.h"
23 #include "emailaddress.h"
24 
25 #include "smtpexports.h"
26 
27 class QIODevice;
28 namespace SimpleMail {
29 
30 class MimeMessagePrivate;
32 {
33  Q_DECLARE_PRIVATE(MimeMessage)
34 public:
35  MimeMessage(bool createAutoMimeConent = true);
36  virtual ~MimeMessage();
37 
38  void setSender(const EmailAddress &sender);
39  EmailAddress sender() const;
40 
41  void setToRecipients(const QList<EmailAddress> &toList);
42  QList<EmailAddress> toRecipients() const;
43  void addTo(const EmailAddress &rcpt);
44 
45  void setCcRecipients(const QList<EmailAddress> &ccList);
46  QList<EmailAddress> ccRecipients() const;
47  void addCc(const EmailAddress &rcpt);
48 
49  void setBccRecipients(const QList<EmailAddress> &bccList);
50  QList<EmailAddress> bccRecipients() const;
51  void addBcc(const EmailAddress &rcpt);
52 
53  void setSubject(const QString &subject);
54  void addPart(MimePart* part);
55 
56  void setHeaderEncoding(MimePart::Encoding);
57 
58  QString subject() const;
59  QList<MimePart *> parts() const;
60 
61  MimePart& getContent();
62  void setContent(MimePart *content);
63 
64  bool write(QIODevice *device);
65 
66 protected:
68 };
69 
70 }
71 
72 #endif // MIMEMESSAGE_H
Encoding
Definition: mimepart.h:35
#define SMTP_EXPORT
Definition: smtpexports.h:7
Definition: mimemessage_p.h:27
Definition: mimepart.h:32
MimeMessagePrivate * d_ptr
Definition: mimemessage.h:67
Definition: mimemessage.h:31
Definition: emailaddress.h:26
Definition: emailaddress.h:29