SVN_SILENT made messages (.desktop file) - always resolve ours
[kdepim.git] / korgac / mailclient.h
blobeba74b3b040824520ca4155fa7fb9353b762ea13
1 /*
2 Copyright (c) 1998 Barry D Benowitz <b.benowitz@telesciences.com>
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (c) 2009 Allen Winter <winter@kde.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution.
24 #ifndef CALENDARSUPPORT_MAILCLIENT_H
25 #define CALENDARSUPPORT_MAILCLIENT_H
27 #include <KCalCore/IncidenceBase>
29 #include <QObject>
31 /**
32 * MailClient is in kdepimlibs/akonadi/calendar now, but it's private API and I don't
33 * feel like making public right now, hence this copy.
35 * Theres probably non calendaring-specific APIs to send e-mails, so I'd like to keep
36 * MailClient private in kdepimlibs.
38 namespace KIdentityManagement
40 class Identity;
43 namespace KOrg
46 class MailClient : public QObject
48 Q_OBJECT
49 public:
50 MailClient();
51 ~MailClient();
53 bool mailAttendees(const KCalCore::IncidenceBase::Ptr &,
54 const KIdentityManagement::Identity &identity,
55 bool bccMe, const QString &attachment = QString(),
56 const QString &mailTransport = QString());
58 bool mailOrganizer(const KCalCore::IncidenceBase::Ptr &,
59 const KIdentityManagement::Identity &identity,
60 const QString &from, bool bccMe,
61 const QString &attachment = QString(),
62 const QString &sub = QString(),
63 const QString &mailTransport = QString());
65 bool mailTo(const KCalCore::IncidenceBase::Ptr &, const KIdentityManagement::Identity &identity,
66 const QString &from, bool bccMe, const QString &recipients,
67 const QString &attachment = QString(), const QString &mailTransport = QString());
69 /**
70 Sends mail with specified from, to and subject field and body as text.
71 If bcc is set, send a blind carbon copy to the sender
73 @param identity is the Identity of the sender
74 @param from is the address of the sender of the message
75 @param to a list of addresses to receive the message
76 @param cc a list of addresses to receive message carbon copies
77 @param subject is the subject of the message
78 @param body is the boody of the message
79 @param hidden if true and using KMail as the mailer, send the message
80 without opening a composer window.
81 @param bcc if true, send a blind carbon copy to the message sender
82 @param attachment optional attachment (raw data)
83 @param mailTransport defines the mail transport method. See here the
84 kdepimlibs/mailtransport library.
86 bool send(const KIdentityManagement::Identity &identity, const QString &from, const QString &to,
87 const QString &cc, const QString &subject, const QString &body,
88 bool hidden = false, bool bccMe = false, const QString &attachment = QString(),
89 const QString &mailTransport = QString());
94 #endif