]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/net/msg.h
wxStyledTextCtrl can now be built and used when wxUSE_UNICODE==1.
[wxWidgets.git] / contrib / include / wx / net / msg.h
CommitLineData
decb3a6a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: msg.h
3// Purpose: wxMailMessage
4// Author: Julian Smart
5// Modified by:
6// Created: 2001-08-21
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma interface "msg.h"
14#endif
15
16#ifndef _WX_MSG_H_
17#define _WX_MSG_H_
18
19/*
20 * wxMailMessage
21 * Encapsulates an email message
22 */
23
24class wxMailMessage
25{
26public:
27
28 // A common usage
29 wxMailMessage(const wxString& subject, const wxString& to,
a23c0047
JS
30 const wxString& body, const wxString& from = wxEmptyString,
31 const wxString& attachment = wxEmptyString,
decb3a6a
JS
32 const wxString& attachmentTitle = wxEmptyString)
33 {
34 m_to.Add(to);
35 m_subject = subject;
36 m_body = body;
a23c0047 37 m_from = from;
decb3a6a
JS
38 if (!attachment.IsEmpty())
39 {
40 m_attachments.Add(attachment);
41 m_attachmentTitles.Add(attachmentTitle);
42 }
43 }
44
45 wxMailMessage() {};
46
47//// Accessors
48
49 void AddTo(const wxString& to) { m_to.Add(to); }
50 void AddCc(const wxString& cc) { m_cc.Add(cc); }
51 void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
52 void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
53 { m_attachments.Add(attach); m_attachmentTitles.Add(title); }
54
55 void SetSubject(const wxString& subject) { m_subject = subject; }
56 void SetBody(const wxString& body) { m_body = body; }
a23c0047 57 void SetFrom(const wxString& from) { m_from = from; }
decb3a6a
JS
58
59public:
60 wxArrayString m_to; //The To: Recipients
a23c0047 61 wxString m_from; //The From: email address (optional)
decb3a6a
JS
62 wxArrayString m_cc; //The CC: Recipients
63 wxArrayString m_bcc; //The BCC Recipients
64 wxString m_subject; //The Subject of the message
65 wxString m_body; //The Body of the message
66 wxArrayString m_attachments; //Files to attach to the email
67 wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
68};
69
70#endif // _WX_MSG_H_
71