* contrib/hbwin/mapi.c
! fixed UNICODE conflict after recent LoadLibrary patch.
this file has forced UNICODE off due to MS idiocy so I had
to add more idiocy to interface with properly UNICODE setting
compliant local API
Note, I didn't test non-UNICODE build, if you're interested
in it, pls do it
* contrib/hbwin/tests/testmapi.prg
+ simpleio
46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "simpleio.ch"
|
|
|
|
#include "hbwin.ch"
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL cSubject := "Test subject"
|
|
LOCAL cBody := "Test body"
|
|
LOCAL lMailConf := .F.
|
|
LOCAL lFromUser := .T.
|
|
LOCAL aSender := { "test from", "from@test.com" }
|
|
LOCAL aDest := { { "test to", "to@test.com", WIN_MAPI_TO } }
|
|
LOCAL aFiles := { { "testmapi.prg", "testmapi" } }
|
|
|
|
? win_MAPISendMail( cSubject, ; // subject
|
|
cBody, ; // menssage
|
|
NIL, ; // type of message
|
|
DToS( Date() ) + " " + Time(), ; // send date
|
|
"", ; // conversation ID
|
|
lMailConf, ; // acknowledgment
|
|
lFromUser, ; // user intervention
|
|
aSender, ; // sender
|
|
aDest, ; // destinators
|
|
aFiles ; // attach
|
|
)
|
|
|
|
// simple format
|
|
|
|
? win_MAPISendMail( cSubject, ; // subject
|
|
cBody, ; // menssage
|
|
NIL, ; // type of message
|
|
DToS( Date() ) + " " + Time(), ; // send date
|
|
"", ; // conversation ID
|
|
lMailConf, ; // acknowledgment
|
|
lFromUser, ; // user intervention
|
|
"from@test.com", ; // sender
|
|
{ "to@test.com" }, ; // destinators
|
|
{ "testmapi.prg" } ; // attach
|
|
)
|
|
|
|
RETURN
|