wxWidgets/contrib/include/wx/net/msg.h
Gilles Depeyrot ab7ce33c56 disable use of #pragma interface under Mac OS X
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 12:28:46 +00:00

72 lines
2.2 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: msg.h
// Purpose: wxMailMessage
// Author: Julian Smart
// Modified by:
// Created: 2001-08-21
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "msg.h"
#endif
#ifndef _WX_MSG_H_
#define _WX_MSG_H_
/*
* wxMailMessage
* Encapsulates an email message
*/
class wxMailMessage
{
public:
// A common usage
wxMailMessage(const wxString& subject, const wxString& to,
const wxString& body, const wxString& from = wxEmptyString,
const wxString& attachment = wxEmptyString,
const wxString& attachmentTitle = wxEmptyString)
{
m_to.Add(to);
m_subject = subject;
m_body = body;
m_from = from;
if (!attachment.IsEmpty())
{
m_attachments.Add(attachment);
m_attachmentTitles.Add(attachmentTitle);
}
}
wxMailMessage() {};
//// Accessors
void AddTo(const wxString& to) { m_to.Add(to); }
void AddCc(const wxString& cc) { m_cc.Add(cc); }
void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
{ m_attachments.Add(attach); m_attachmentTitles.Add(title); }
void SetSubject(const wxString& subject) { m_subject = subject; }
void SetBody(const wxString& body) { m_body = body; }
void SetFrom(const wxString& from) { m_from = from; }
public:
wxArrayString m_to; //The To: Recipients
wxString m_from; //The From: email address (optional)
wxArrayString m_cc; //The CC: Recipients
wxArrayString m_bcc; //The BCC Recipients
wxString m_subject; //The Subject of the message
wxString m_body; //The Body of the message
wxArrayString m_attachments; //Files to attach to the email
wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
};
#endif // _WX_MSG_H_