simflex
asked on
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("safetyInvest igator")
riskMan = Request.form("riskManageme nt")
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'>"&visoremai l&"</font> "
end if
Thanks
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("safetyInvest
riskMan = Request.form("riskManageme
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'>"&visoremai
end if
Thanks
"'&riskMan,investigator&'"
you need single quote ' versus double "
you need single quote ' versus double "
usually emails are seperated by semi-colons, not commas. i think i have had issues before using commas.
ASKER
If I have it like this:
"" & riskMan & ""
it works but other than that, no love
"" & riskMan & ""
it works but other than that, no love
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
I keep getting:
error '8004020f'
And it is *only* happening on the cc line.
Others working fine.
ASKER
Thanks to you guys. It is finally working.
.cc = ""&riskMan,investigator&""
to this
.cc = """ & riskMan & "," & investigator &"""
or this one, i'm not sure
.cc = """ & riskMan & """,""" & investigator &"""