Solved

code to send CC to multiple receivers

Posted on 2004-08-27
2
742 Views
Last Modified: 2013-12-18
I am writing VB program to send email by Lotus Notes and the code is attached below. I would like to send CC to multiple receivers. How to do that?

PS: I cannot do that with comma (,) ie:
MyCopyTo = "first@mail.com, second@mail.com, third@mail.com"

Thanks

The Code:

    On Error GoTo LotusError
    Dim OLESess As Object
    Dim OLEDB As Object
    Set OLESess = CreateObject("Notes.Notessession")
    Set OLEDB = OLESess.GetDatabase(LotusNotesServer, LotusNotesPath)

    On Error GoTo NotesError
    Const EMBED_ATTACHMENT = 1454
    ' Creates a new document/message.
    Dim Doc As Object
    Dim NItem As Object
    Set Doc = OLEDB.CreateDocument
    With Doc
        ' creates body of message and populates headers
        Set NItem = Doc.CreateRichTextItem("BODY")
        .Form = "Memo"
        .Subject = MySubject
        .SendTo = MySendTo
        .CopyTo = MyCopyTo       <<<<<<<-----------------
        .Body = MyBody
        .postdate = Date
        .SaveMessageOnSend = True
        .PostedDate = Now
        Call NItem.EmbedObject(EMBED_ATTACHMENT, "", MyAttach)
        .Send False
    End With
   
 
0
Comment
Question by:leekf
2 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 125 total points
Comment Utility
You can try with MyCopyTo as an array of strings, not just a string.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
> .CopyTo = MyCopyTo       <<<<<<<-----------------
Replace the above line with this

.CopyTo = Split(MyCopyTo, ",")

~Hemanth
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now