Seite 2 von 2

Verfasst: 18.11.2008 15:27
von kwai chang caine
Thanks for this precious explanation KIFFI 8)
It's not always easy to all understand :oops:

TS-Soft versus Srod
if the GODS of programming are fighting them now, we are not ready to get out :lol:

Well i can put both LIB in my folder UserLibraries.

Have you the time in this day, to begin translate in COM lib the LOTUS management ????
There are no much code for LOTUS in all the PB forum :cry:
I know it's the most rotten of client mail, but i have this in my job :freak:

I have also thinking to create an VB EXE who send the mail, when i launch it and send it the parameter in a file or in the program parameter, but, it's a pig programming :oops:

Verfasst: 18.11.2008 15:34
von Kiffi
kwai chang caine hat geschrieben:Well i can put both LIB in my folder UserLibraries.
COMate is an include, not a Lib. :-)
kwai chang caine hat geschrieben:Have you the time in this day, to begin translate in COM lib the LOTUS management ????
this is, what i have so far:

Code: Alles auswählen

Procedure SendNotesMail(Subject.s, Attachment.s, BodyText.s, SendTo.s, cc.s = "", BCC.s = "", SaveIt.l = #False)
  
  ; Set up the objects required for Automation into lotus notes
  Protected Maildb.COMateObject ; The mail database
  Protected UserName.s ;The current users notes name
  Protected MailDbName.s ;THe current users notes mail database name
  Protected MailDoc.COMateObject ;The mail document itself
  Protected AttachME.COMateObject ;The attachment richtextfile object
  Protected Session.COMateObject ;The notes session
  Protected EmbedObj.COMateObject ;The embedded object (Attachment)
  Protected intAttach.l
  Protected intAttachments.l
  Protected strAttachmentName.s
  
  ; Start a session to notes
  Session = COMate_CreateObject("Notes.NotesSession")
  
  ; Get the sessions username and then calculate the mail file name
  ; You may or may not need this as for MailDBname with some systems you
  ; can pass an empty string
  UserName = Session\GetStringProperty("UserName")
  MailDbName = Left(UserName, 1) + Right(UserName, (Len(UserName) - FindString(UserName, " ", 1))) + ".nsf"
  
  ; Open the mail database in notes
  Maildb =  Session\GetObjectProperty("GetDatabase('', '" + MailDbName + "')")
  
  IsOpen = Maildb\GetIntegerProperty("IsOpen")
  
  If IsOpen
    ; Already open for mail
  Else
    Maildb\Invoke("OPENMAIL")
  EndIf
  
  ; Set up the new mail document
  MailDoc = Maildb\GetObjectProperty("CREATEDOCUMENT")
  
  MailDoc\SetProperty("Form = 'Memo'")
  MailDoc\SetProperty("SendTo = '" + SendTo + "'")
  MailDoc\SetProperty("CopyTo = '" + cc + "'")
  MailDoc\SetProperty("BlindCopyTo = '" + BCC + "'")
  MailDoc\SetProperty("Subject = '" + Subject + "'")
  MailDoc\SetProperty("Body = '" + BodyText + "'")
  MailDoc\SetProperty("SAVEMESSAGEONSEND = '" + SaveIt + "'")

  intAttachments = dhCountTokens(Attachment, ",") ; --> dhCountTokens???

but it's not tested, because i have no Lotus installed.

Greetings ... Kiffi

Verfasst: 18.11.2008 16:22
von kwai chang caine
You are an angel KIFFI :D

Verfasst: 18.11.2008 16:51
von kwai chang caine
Ooohhh !!!!

I had not really understood interest of COMate :shock:
You're right (You're always right :wink:), it's an include
It's cool to see the code, even if i don't understand anything :mrgreen:

Again thanks for this good way.
I go to ask my futur question to SROD

I wish you a good day

Re: Lotus and PureDisHelper [Resolved]

Verfasst: 03.05.2011 12:17
von kwai chang caine
Hello at all deutch man 8)

Excuse me again to disturb you another time, furthermore in very bad english :oops:
But i need another time precious help :praise:

I try to use LOTUS NOTES with PB and COMATE, that's works fine, but i have a little problem
It's impossible to send password :cry:

Code: Alles auswählen

#EMBED_ATTACHMENT = 1454 
#EMBED_OBJECT = 1453 
#EMBED_OBJECTLINK = 1452 

; Set up the objects required for Automation into lotus notes 
Protected DataBaseNote.COMateObject ; The mail database 
Protected UserName.s ;The current users notes name 
Protected MailDbName.s ;THe current users notes mail database name 
Protected MailNote.COMateObject ;The mail document itself 
Protected Session.COMateObject ;The notes session 
Protected ObjetJoint.COMateObject ;The embedded object (Attachment) 
Protected CorpPieceJointe.COMateObject 
Protected CorpMail.COMateObject
Protected EspaceTravailNote.COMateObject 

; cree la session Lotus Notes 
Session = COMate_CreateObject("Notes.NotesSession") 

; Get the sessions username and then calculate the mail file name 
; You may or may not need this as for MailDBname with some systems you 
; can pass an empty string 
UserName = Session\GetStringProperty("UserName") 
MailDbName = Left(UserName, 1) + Right(UserName, (Len(UserName) - FindString(UserName, " ", 1))) + ".nsf" 

; se connecte a sa database 
DataBaseNote = Session\GetObjectProperty("GetDatabase('', '" + MailDbName + "')") 
IsOpen = DataBaseNote\GetIntegerProperty("IsOpen") 
    
If IsOpen 
; Already open for mail 
Else 
DataBaseNote\Invoke("OPENMAIL")
EndIf
    
;Set up the new mail document 
MailNote = DataBaseNote\GetObjectProperty("CREATEDOCUMENT") 

If Not MailNote
ProcedureReturn #False
EndIf

CorpMail = MailNote\GetObjectProperty("CREATERICHTEXTITEM('Body')") 

MailNote\SetProperty("Form = 'Memo'") 
MailNote\SetProperty("SendTo = '" + EnvoyerA + "'") 
MailNote\SetProperty("CopyTo = '" + CopieConforme + "'") 
MailNote\SetProperty("BlindCopyTo = '" + CopieCacher + "'") 
MailNote\SetProperty("Subject = '" + SujetMail + "'") 
MailNote\SetProperty("Body = '" + TexteMail + "'") 
       
Delay(1000)
   
; Envoi du mail
MailNote\SetProperty("PostedDate = '" + FormatDate("%dd/%mm/%yyyy", Date()) + " " + FormatDate("%hh:%ii:%ss", Date()) + "'") 
MailNote\Invoke("SEND(0, '" + EnvoyerA + "')")

Session\Release()
CorpPieceJointe\Release()
CorpMail\Release()
DataBaseNote\Release()
MailNote\Release()
In the english and french forum nobody know how i can replace this line in COMATE :oops:

Code: Alles auswählen

Set Session = CreateObject("Notes.NotesSession")
Session.Initialize("password")
I have try

Code: Alles auswählen

Session = COMate_CreateObject("Notes.NotesSession")
Session\Invoke("Initialize('password')")
And also

Code: Alles auswählen

Session = COMate_CreateObject("Notes.NotesSession")
Session\SetProperty("Initialize = 'password'")
But that not works :(

So i have try also PureDishelper, but it's too hard for me to translate COMATE code in PureDishelper :oops:
I'm really desperate ...

If a kind member can help me another time..i promise you not return here, for disturb you again, in a long time ago :lol:

Thanks and good day