FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mail_send.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include "network.h"
19 #include <QtCore/QString>
20 
21 namespace qtnetwork {
22 
23 class Message;
24 class SmtpAccount;
25 
27 {
28 public:
29  MailSend();
30  ~MailSend();
31 
32  int timeout() const;
33  void setTimeout(int msecs);
34 
35  bool connectToSmtpServer(const SmtpAccount& account);
36  bool sendMessage(const Message& msg);
37 
38  QString errorString() const;
39 
40 private:
41  class Private;
42  Private* const d;
43 };
44 
45 } // namespace qtnetwork
Provides a convenient interface for working with messages.
Definition: message.h:24
Provides a convenient interface to define the user account to connect to a SMTP server.
Definition: smtp_account.h:23
#define QTTOOLS_NETWORK_EXPORT
Definition: network.h:27
Provides service to send messages through SMTP.
Definition: mail_send.h:26
Definition: mail_send.cpp:39