bug in Mapi

Post Reply
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

bug in Mapi

Post by ukservice »

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
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: bug in Mapi

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: bug in Mapi

Post by Antonio Linares »

UkService,

What FWH version are you using ? Harbour or xHarbour ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: bug in Mapi

Post by ukservice »

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
toninhofwi
Posts: 161
Joined: Tue Oct 18, 2005 10:01 am

Re: bug in Mapi

Post by toninhofwi »

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.
Post Reply