1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMailMessage
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma interface "msg.h"
21 * Encapsulates an email message
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
)
38 if (!attachment
.IsEmpty())
40 m_attachments
.Add(attachment
);
41 m_attachmentTitles
.Add(attachmentTitle
);
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
); }
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
; }
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