Using CDO to cc multiple recipients

Posted on 2006-05-04
Last Modified: 2007-12-19
This seems so simple but it isn't working.

I am trying to copy multiple recipients in an email but the emails are not getting sent.

I am having problem on the .cc line

Any ideas?

Investigator = Request.form("safetyInvestigator")
riskMan = Request.form("riskManagement")

With iMsg
 Set .Configuration = iConf
     .From = ""
     .To = ""&visoremail&""
     .Sender      = ""
     .cc          = ""&riskMan,investigator&""
     .Subject     = "From President's Office "
     .TextBody    = "Please take care of this ASAP."
End With
      if err <> 0 then
            response.write "Error encountered: " & Err.Description
            response.write "<font color='ffffff'>"&visoremail&"</font>"
      end if

Question by:simflex
    LVL 6

    Expert Comment

    change this line
     .cc          = ""&riskMan,investigator&""

    to this
     .cc          = """ & riskMan & "," & investigator &"""

    or this one, i'm not sure
     .cc          = """ & riskMan & """,""" & investigator &"""

    LVL 30

    Expert Comment


    you need single quote '   versus double "
    LVL 22

    Expert Comment

    usually emails are seperated by semi-colons, not commas.  i think i have had issues before using commas.

    Author Comment

    If I have it like this:

    "" & riskMan & ""

    it works but other than that, no love
    LVL 6

    Assisted Solution

    what about
    "" & riskMan & ;" & investigator & ""
    "" & riskMan & ";"" & investigator & ""
    LVL 22

    Accepted Solution

    sorry, but the quotes are all out of whack in your comment john.

    .cc          = riskMan & ";" & investigator

    also no need for the quotes at the start or end.

    Author Comment

    sorry folks, I didn't run away. It's just that I have been trying to resolve the error thrown as a result of using any of the formats you guys have suggested.

    I keep getting:

    error '8004020f'

    And it is *only* happening on the cc line.

    Others working fine.

    Author Comment

    Thanks to you guys. It is finally working.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 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

    20 Experts available now in Live!

    Get 1:1 Help Now