MAPI ERROR with Outlook

MAPI ERROR with Outlook

Postby jacquet philippe » Sat Nov 19, 2005 8:27 pm

I have an application sending mail with a link with Oulook 2000 and it worked fine .


My custommer install outlook 2003 and i receive a MAPI.dll error

What can i do ??
jacquet philippe
 
Posts: 22
Joined: Fri Nov 04, 2005 9:05 pm
Location: LIEGE Belgium

Re: MAPI ERROR with Outlook

Postby Rimantas » Fri Nov 25, 2005 7:55 am

jacquet philippe wrote:I have an application sending mail with a link with Oulook 2000 and it worked fine .


My custommer install outlook 2003 and i receive a MAPI.dll error

What can i do ??


Try something similar to MSMAPI . Maybe it helps ?

PROCEDURE Mail()

LOCAL oSession, oMessage

TRY
oSession := CreateObject( "MSMAPI.MAPISession" )
oSession:SignOn()
CATCH
Alert( "SimpleMapi not avilable." )
BREAK
END

TRY
oMessage := CreateObject( "MSMAPI.MAPIMessages" )
CATCH
Alert( "MSMAPI.Messages faild!" )
BREAK
END

WITH OBJECT oMessage
:SessionID := oSession:SessionID
:Compose()

:RecipAddress := "tests@xharbour.org"
:AddressResolveUI := .T.
:ResolveName()

:MsgSubject := "email from xHarbour"
:MsgNoteText := "Hi Brian, here it is..."

:AttachmentIndex := 0
:AttachmentPosition := 0
:AttachmentPathName := "c:\xharbour\tests\test.prg"

:Send( .F. ) // .T. Interactive or .F. for automated.
END

oSession:SignOff()

RETURN

With best regards ! Rimantas
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Postby George » Thu Jan 31, 2008 4:10 pm

Hi Rimantas,

Where can I get more information regarding outlook methods?

Using your code I can create the email and call the outlook, but when I click "Send" button the outlook close and do not send the email.
Do you know what method allow to send the email before closing the Outlook?

Regards,

George
George
 
Posts: 725
Joined: Tue Oct 18, 2005 6:49 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests