vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I'm using following code to send an email using ActiveX to control Lotus Notes R5 : DEFINE VAR msgRecip AS CHAR NO-UNDO INIT "receiver@test.com. DEFINE VAR msgReply AS CHAR NO-UNDO. DEFINE VAR msgCopy AS CHAR NO-UNDO. DEFINE VAR msgbCopy AS CHAR NO-UNDO. DEFINE VAR msgTitle AS CHAR NO-UNDO INIT "TITLE". DEFINE VAR msgBody AS CHAR NO-UNDO. DEFINE VAR msgAttach AS CHAR NO-UNDO. DEFINE VARIABLE EMBED_ATTACHMENT AS INT INIT 1454. DEFINE VARIABLE notesSession AS COM-HANDLE NO-UNDO. DEFINE VARIABLE notesDB AS COM-HANDLE NO-UNDO. DEFINE VARIABLE notesDoc AS COM-HANDLE NO-UNDO. DEFINE VARIABLE notesAttach AS COM-HANDLE NO-UNDO. DEFINE VARIABLE curattach AS CHAR NO-UNDO. DEFINE VARIABLE i AS INT NO-UNDO. DEFINE VARIABLE j AS INT NO-UNDO. DEFINE VARIABLE mail-file AS CHAR NO-UNDO. DEFINE VARIABLE mail-server AS CHAR NO-UNDO. /* Create a session and log on -- username and password in profile */ CREATE "NOTES.NOTESSESSION":U notesSession NO-ERROR. IF ERROR-STATUS:ERROR THEN DO: MESSAGE "Unable to connect to users mail file" VIEW-AS ALERT-BOX ERROR BUTTONS OK. RETURN. END. mail-file = notessession:GetEnvironmentString("MailFile":U,YES ). IF mail-file = "" THEN DO: MESSAGE "Unable to connect to users mail file" VIEW-AS ALERT-BOX ERROR BUTTONS OK. RETURN. END. mail-server = notessession:GetEnvironmentString("MailServer":U,Y ES). /* Set db and create document */ notesDB = notessession:GetDatabase(mail-server , mail-file). /* create a message and fill in its properties */ ASSIGN notesDoc = notesDB:CREATEDOCUMENT notesdoc:Form = "Memo":U notesDoc:Subject = msgtitle notesDoc:Body = msgbody msgrecip = REPLACE(msgrecip,"|":U,",":U) msgreply = REPLACE(msgreply,"|":U,",":U) msgcopy = REPLACE(msgcopy,"|":U,",":U) notesDoc:SendTo = msgRecip notesDoc:ReplyTo = msgreply notesDoc:CopyTo = msgcopy notesDoc:BlindCopyTo = msgbcopy NO-ERROR. /* Create attachments */ DO i = 1 TO NUM-ENTRIES(msgAttach,"|":U): curAttach = ENTRY(i,msgAttach,"|":U). IF curattach <> "":U THEN DO: notesAttach = notesDoc:CreateRichTextItem("API PRO file":U). notesAttach:EMBEDOBJECT(EMBED_ATTACHMENT, 0, curattach,"API=20 PRO file":U). END. END. /* notesDoc:save(true, false). */ ASSIGN notesDoc:SaveMessageOnSend = TRUE NO-ERROR. notesDoc:SEND(False,msgrecip). IF msgattach > "":U THEN RELEASE OBJECT notesAttach NO-ERROR. RELEASE OBJECT notesDoc NO-ERROR. RELEASE OBJECT notesDB NO-ERROR. RELEASE OBJECT notesSession NO-ERROR. My problem is that I don't know how to send the same message to more than one receiver... using a comma as separator doesn't help me... Anyone an idea ? Johan |