FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour sending mail trought Lotus Notes
Posts: 564
Joined: Thu Oct 13, 2005 09:23 AM
sending mail trought Lotus Notes
Posted: Thu Apr 06, 2006 10:28 AM

Hello:
Has anybody a sample of sending mail trought Lotus Notes ? It has to be done using OLE and I don't find how to do it.

Regards,

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
sending mail trought Lotus Notes
Posted: Thu Apr 06, 2006 10:41 AM

Jose Luis,

Do you have Lotus Notes installed on your computer ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 564
Joined: Thu Oct 13, 2005 09:23 AM
sending mail trought Lotus Notes
Posted: Thu Apr 06, 2006 10:50 AM

Yes, I've Notes.

This is a sample with VB:

Set session = CreateObject("Notes.NotesSession")
Set db = session.GetDatabase("", "")
Set doc = db.CreateDocument()

doc.Form = "Main Topic"
doc.Subject = Form1.Text3.Text
doc.Body = Form1.Text2.Text
Call doc.Save(True, False)

Regards,

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
sending mail trought Lotus Notes
Posted: Thu Apr 06, 2006 10:57 AM

Jose Luis,

Ok, have you tried the same logic with xharbour TOleAuto ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 564
Joined: Thu Oct 13, 2005 09:23 AM
sending mail trought Lotus Notes
Posted: Thu Apr 06, 2006 11:24 AM

Yes, this is the code:

oNotesSession := CreateObject( "Notes.Notessession" )
oNotesDb := oNotesSession:GetDatabase( "","" )
oNotesDb:Invoke("CreateDocument")

but I get the error that I've posted in the spanish forum.

Regards,

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
sending mail trought Lotus Notes
Posted: Fri Apr 07, 2006 07:13 PM

Jose,

I believe Lotus Notes supports MAPI. Have you tried it?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
sending mail trought Lotus Notes
Posted: Fri Apr 07, 2006 11:17 PM

Jose Luis,

Prueba lo siguiente:

MsgInfo( oNotesSession:hObj )
oNotesDb := OleInvoke( oNotesSession:hObj, "GetDatabase", "", "" )
MsgInfo( oNotesDb )

y dinos que valores te aparecen.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 564
Joined: Thu Oct 13, 2005 09:23 AM
sending mail trought Lotus Notes
Posted: Mon Apr 10, 2006 10:06 AM

Antonio:
Los dos mensajes me devuelven valores númericos de 7 digitos y no me dan error.

Saludos,

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
sending mail trought Lotus Notes
Posted: Mon Apr 10, 2006 10:29 AM

Jose Luis,

Intenta ahora esto:

OleInvoke( oNotesDb, "CreateDocument" )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion