Win32-2.14.1.0: A binding to Windows Win32 API.
Copyright(c) Esa Ilari Vuokko 2006
LicenseBSD-style (see the file LICENSE)
MaintainerEsa Ilari Vuokko <ei@vuokko.info>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

System.Win32.SimpleMAPI

Description

FFI-bindings to interact with SimpleMAPI

Synopsis

Documentation

newtype MapiRecipDesc Source #

Constructors

MapiRecipDesc () 

mapiErrors :: [(ULONG, String)] Source #

mapiFail :: String -> IO ULONG -> IO ULONG Source #

mapiFail_ :: String -> IO ULONG -> IO () Source #

type MapiLogonType = ULONG -> LPSTR -> LPSTR -> MapiFlag -> ULONG -> Ptr LHANDLE -> IO ULONG Source #

type MapiFreeBufferType = Ptr () -> IO ULONG Source #

type MapiLoaded = (MapiFuncs, ForeignPtr ()) Source #

loadMapiFuncs :: String -> HMODULE -> IO MapiFuncs Source #

 

loadMapiDll :: String -> IO (MapiFuncs, HMODULE) Source #

 

withMapiFuncs :: [String] -> (MapiFuncs -> IO a) -> IO a Source #

 

loadMapi :: [String] -> IO MapiLoaded Source #

 

c_FreeLibraryFinaliser :: FunPtr (HMODULE -> IO ()) Source #

withMapiLoaded :: MapiLoaded -> (MapiFuncs -> IO a) -> IO a Source #

 

mapiLogon Source #

Arguments

:: MapiFuncs

Functions loaded from MAPI DLL

-> Maybe HWND

Parent window, used for modal logon dialog

-> Maybe String

Session

-> Maybe String

Password

-> MapiFlag

None, one or many flags: FORCE_DOWNLOAD, NEW_SESSION, LOGON_UI, PASSWORD_UI

-> IO LHANDLE 

Create Simple MAPI-session by logon

mapiLogoff :: MapiFuncs -> LHANDLE -> Maybe HWND -> IO () Source #

End Simple MAPI-session

data Recipient Source #

Constructors

RecipResolve (Maybe HWND) MapiFlag String (Maybe Recipient) 
Recip String String 

Instances

Instances details
Show Recipient Source # 
Instance details

Defined in System.Win32.SimpleMAPI

Methods

showsPrec :: Int -> Recipient -> ShowS

show :: Recipient -> String

showList :: [Recipient] -> ShowS

withRecipients :: MapiFuncs -> LHANDLE -> Recipients -> (Int -> Ptr MapiRecipDesc -> IO a) -> IO a Source #

data FileTag Source #

Constructors

FileTag 

Fields

Instances

Instances details
Show FileTag Source # 
Instance details

Defined in System.Win32.SimpleMAPI

Methods

showsPrec :: Int -> FileTag -> ShowS

show :: FileTag -> String

showList :: [FileTag] -> ShowS

withFileTag :: FileTag -> (Ptr FileTag -> IO a) -> IO a Source #

data Attachment Source #

Constructors

Attachment 

Fields

Instances

Instances details
Show Attachment Source # 
Instance details

Defined in System.Win32.SimpleMAPI

Methods

showsPrec :: Int -> Attachment -> ShowS

show :: Attachment -> String

showList :: [Attachment] -> ShowS

withAttachments :: Attachments -> (Int -> Ptr Attachment -> IO a) -> IO a Source #

data Message Source #

Constructors

Message 

Fields

Instances

Instances details
Show Message Source # 
Instance details

Defined in System.Win32.SimpleMAPI

Methods

showsPrec :: Int -> Message -> ShowS

show :: Message -> String

showList :: [Message] -> ShowS

withMessage :: MapiFuncs -> LHANDLE -> Message -> (Ptr Message -> IO a) -> IO a Source #

mapiSendMail :: MapiFuncs -> LHANDLE -> Maybe HWND -> Message -> MapiFlag -> IO () Source #

handleIOException :: (IOException -> IO a) -> IO a -> IO a Source #