>i like to try create app can read and send email from lotus notes V.6, does anyone have development..?
Here's code I'm using
DEFINE CLASS cusNotesAutomation AS CUSTOM
oNotes = ""
oNotesDbDirectory = ""
oNotesDatabase = ""
cPassword = ""
lSaveOnSend = .F.
lEncryptOnSend = .F.
DIMENSION aRecipients(1)
cSubject = ""
cBody = ""
DIMENSION aAttachments(1)
FUNCTION OpenNotes()
WITH THIS
.oNotes = CREATEOBJECT("Lotus.NotesSession")
.oNotes.Initialize(.cPassword)
.oNotesDbDirectory = .oNotes.GetDbDirectory("")
.oNotesDatabase = .oNotesDbDirectory.OpenMailDatabase()
ENDWITH
ENDFUNC
FUNCTION SendNotesMail()
LOCAL ARRAY laRecipients(1), laAttachments(1)
LOCAL lcResults, lcSuccess
LOCAL loNotesDocument, loNotesRichTextItem, loAttachment
ACOPY(THIS.aRecipients, laRecipients)
ACOPY(THIS.aAttachments, laAttachments)
lcSuccess = ""
loNotesDocument = THIS.oNotesDatabase.CreateDocument()
WITH loNotesDocument
.ReplaceItemValue("Logo", "Plain Text")
.ReplaceItemValue("SendTo", @laRecipients)
.ReplaceItemValue("Subject", THIS.cSubject)
DO CASE
CASE (LEN(ALLTRIM(THIS.cBody)) = 0) AND (TYPE("laAttachments(1)") = "C")
loRichTextItem = .CreateRichTextItem("Body")
CASE LEN(ALLTRIM(THIS.cBody)) > 0
.ReplaceItemValue("Body", THIS.cBody)
IF TYPE("laAttachments(1)") = "C"
loRichTextItem = .CreateRichTextItem("Attachment")
ENDIF
OTHERWISE
ENDCASE
IF TYPE("loRichTextItem" ) = "O"
FOR EACH loAttachment IN laAttachments
IF TYPE("loAttachment") = "C"
loRichTextItem.EmbedObject(1454, "", loAttachment)
ENDIF
ENDFOR
ENDIF
.SaveMessageOnSend = THIS.lSaveOnSend
.EncryptOnSend = THIS.lEncryptOnSend
.SEND(0)
lcSuccess = "Message sent successfully."
ENDWITH
RETURN lcSuccess
ENDFUNC
ENDDEFINE