1/*
2 Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3 Copyright (c) 2007 KovoKs <kovoks@kovoks.nl>
4
5 Based on KMail code by:
6 Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
7
8 This library is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Library General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or (at your
11 option) any later version.
12
13 This library is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
16 License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to the
20 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 02110-1301, USA.
22*/
23
24#ifndef MAILTRANSPORT_SENDMAILJOB_H
25#define MAILTRANSPORT_SENDMAILJOB_H
26
27#include <mailtransport/transportjob.h>
28
29#include <QtCore/QProcess>
30
31class SendMailJobPrivate;
32
33namespace MailTransport {
34
35/**
36 Mail transport job for sendmail.
37
38 @deprecated Use MessageQueueJob for sending e-mail.
39*/
40class MAILTRANSPORT_DEPRECATED_EXPORT SendmailJob : public TransportJob
41{
42 Q_OBJECT
43 public:
44 /**
45 Creates a SendmailJob.
46 @param transport The transport settings.
47 @param parent The parent object.
48 */
49 explicit SendmailJob( Transport *transport, QObject *parent = 0 );
50
51 /**
52 Destroys this job.
53 */
54 virtual ~SendmailJob();
55
56 protected:
57 virtual void doStart();
58 virtual bool doKill();
59
60 private Q_SLOTS:
61 void sendmailExited( int, QProcess::ExitStatus );
62 void receivedError();
63 void receivedStdErr();
64
65 private:
66 SendMailJobPrivate *const d;
67};
68
69} // namespace MailTransport
70
71#endif // MAILTRANSPORT_SENDMAILJOB_H
72