Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Recipients in Lotus Notes
Message
From
18/12/2001 16:13:18
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00595660
Message ID:
00595848
Views:
27
>Rich,
>
>Could you post the final version of the code, including an idea of how the array was created? I'm working on this same problem....
>
>Thanks!

Phil: Here's the code so far. I haven't yet started experimenting with the body of the message and I have the feeling that there should be a Rich Text Item of some sort which will allow much better control over formatting, font, effects, etc. If you've done anything on that line, I'd appreciate seeing it.

......Rich
FUNCTION SendNotesMail
PARAMETERS tcToList,tcSubject,tcBody,tcAttachment
**  tcToList is expected to be a semi-colon delimited list of addressees
**  tcAttachment is expected to be a semi-colon delimited list of attachments
  
**  Create array of recipients
=ALINES(acRecipients,CHRTRAN(tcToList,";",CHR(13)))

loNotes = CreateObject("Lotus.Notessession")
loNotes.Initialize("MyPassword")
loDBDir = loNotes.GetDBDirectory("")
loDb = loDBDir.OpenMailDatabase()
loDoc = loDb.CreateDocument

loDoc.ReplaceItemValue("Subject",tcSubject)
loDoc.ReplaceItemValue("Body", tcBody)
loDoc.ReplaceItemValue("SendTo", @acRecipients)

*-- check if there's an attachment
IF TYPE('tcAttachment') = "C" AND NOT EMPTY(tcAttachment)
	**  Create array of Attachments
	lnNumAttach = ALINES(acAttach,CHRTRAN(tcAttachment,";",CHR(13)))

	FOR I = 1 TO lnNumAttach
		loRichTextItem = loDoc.CreateRichTextItem("Attachment")
		=loRichTextItem.EmbedObject(1454, "", acAttach[I])
	ENDFOR
ENDIF

loDoc.Send(.F.)

RELEASE loNotes

RETURN 0
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform