sending mail trought Lotus Notes

Post Reply
User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

sending mail trought Lotus Notes

Post by José Luis Sánchez »

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,
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose Luis,

Do you have Lotus Notes installed on your computer ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

Post by José Luis Sánchez »

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,
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose Luis,

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

Antonio Linares
www.fivetechsoft.com
User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

Post by José Luis Sánchez »

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,
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Jose,

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

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
José Luis Sánchez
Posts: 484
Joined: Thu Oct 13, 2005 9:23 am
Location: Novelda - Alicante - España
Contact:

Post by José Luis Sánchez »

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

Saludos,
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose Luis,

Intenta ahora esto:

OleInvoke( oNotesDb, "CreateDocument" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply