• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1269
  • Last Modified:

Using CDO to cc multiple recipients

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 = "john.doe@domain.com"
     .To = ""&visoremail&""
     .Sender      = "john.doe@domain.com"
     .cc          = ""&riskMan,investigator&""
     .Subject     = "From President's Office "
     .TextBody    = "Please take care of this ASAP."
       .Send
End With
      if err <> 0 then
            response.write "Error encountered: " & Err.Description
            else
            response.write "<font color='ffffff'>"&visoremail&"</font>"
      end if


Thanks
0
simflex
Asked:
simflex
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
John_LennonCommented:
change this line
 .cc          = ""&riskMan,investigator&""

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

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

0
 
Irwin SantosComputer Integration SpecialistCommented:
"'&riskMan,investigator&'"


you need single quote '   versus double "
0
 
WMIFCommented:
usually emails are seperated by semi-colons, not commas.  i think i have had issues before using commas.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
simflexAuthor Commented:
If I have it like this:

"" & riskMan & ""

it works but other than that, no love
0
 
John_LennonCommented:
what about
"" & riskMan & ;" & investigator & ""
or
"" & riskMan & ";"" & investigator & ""
?
0
 
WMIFCommented:
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.
0
 
simflexAuthor Commented:
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.
0
 
simflexAuthor Commented:
Thanks to you guys. It is finally working.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now