Solved

code to send CC to multiple receivers

Posted on 2004-08-27
2
746 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Accepted Solution

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

Expert Comment

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

.CopyTo = Split(MyCopyTo, ",")

~Hemanth
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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