]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/net/msg.h
corrected the value of EUC_JP
[wxWidgets.git] / contrib / include / wx / net / msg.h
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 #if defined(__GNUG__) && !defined(__APPLE__)
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
24 class wxMailMessage
25 {
26 public:
27
28 // A common usage
29 wxMailMessage(const wxString& subject, const wxString& to,
30 const wxString& body, const wxString& from = wxEmptyString,
31 const wxString& attachment = wxEmptyString,
32 const wxString& attachmentTitle = wxEmptyString)
33 {
34 m_to.Add(to);
35 m_subject = subject;
36 m_body = body;
37 m_from = from;
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; }
57 void SetFrom(const wxString& from) { m_from = from; }
58
59 public:
60 wxArrayString m_to; //The To: Recipients
61 wxString m_from; //The From: email address (optional)
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