]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/net/email.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxEmail: portable email client class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "email.h"
16 // For compilers that support precompilation, includes "wx/wx.h".
17 #include "wx/wxprec.h"
27 #include "wx/string.h"
28 #include "wx/net/email.h"
31 #include "wx/net/smapi.h"
35 // Specify profile, or leave it to wxWindows to find the current user name
38 bool wxEmail::Send(wxMailMessage
& message
, const wxString
& profileName
)
40 wxASSERT (message
.m_to
.GetCount() > 0) ;
42 wxString
profile(profileName
);
43 if (profile
.IsEmpty())
44 profile
= wxGetUserName();
46 wxMapiSession session
;
48 if (!session
.MapiInstalled())
50 if (!session
.Logon(profile
))
53 return session
.Send(message
);
56 #error Send not yet implemented for this platform.