FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour bug in Mapi
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
bug in Mapi
Posted: Tue Feb 23, 2010 03:14 PM

Hi,

When you close the Mail client, a GPF occurs.

This is the test code:

#include "FiveWin.ch"
#include "Mail.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "Using Windows MAIL Services"

SET MESSAGE OF oWnd TO "FiveWin - Windows MAIL support" CENTERED
ACTIVATE WINDOW oWnd ON INIT Test() ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//

function Test()
local oMail
DEFINE MAIL oMail ;
SUBJECT "Testing..." ;
TEXT "This is real xBase power at your fingertips!" ;
FROM USER ;
RECEIPT
ACTIVATE MAIL oMail
MsgInfo( oMail:nRetCode )
return nil
//----------------------------------------------------------------------------//

Thanks

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: bug in Mapi
Posted: Tue Feb 23, 2010 03:59 PM

Hello Ukservice,

I tried your example but I got no problem at all. Everything is running just fine.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in Mapi
Posted: Tue Feb 23, 2010 05:06 PM

UkService,

What FWH version are you using ? Harbour or xHarbour ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: bug in Mapi
Posted: Tue Feb 23, 2010 07:07 PM

Hi,

FWH August 2009 and Harbour 2.0.

GPF happens AFTER closing Mail client.

Thanks

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 182
Joined: Tue Oct 18, 2005 10:01 AM
Re: bug in Mapi
Posted: Tue Feb 23, 2010 07:30 PM

Hi.

Harbour have built-in MAPI, please look at this sample:

---cut---

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
---cut---

Regards,

Toninho.

Continue the discussion