Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO message with CC or BCC fails to send

Status
Not open for further replies.

DebbieDavis

Programmer
Jun 7, 2002
146
US
Greetings, I'm using this simple code to send customers an email after their helpdesk ticket is resolved. I wanted to copy myself on the emails, but
when I enter
Code:
myMail.BCC or myMail.CC
, it fails to send. If I comment out these lines, the message sends successfully. I've made sure the bcc or cc addresses are valid. (I changed the names in my post to protect the innocent).

Any thoughts? Thanks.

Code:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Helpdesk Ticket Resolution"
myMail.From="helpdesk@helpdesk.com"
myMail.To="user@oursite.com"
myMail.BCC="webmaster@helpdesk.com"
myMail.HTMLBody=body
myMail.Configuration.Fields.Item _
("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")=2[/URL]
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] _
="mail.server.com"
'Server port
myMail.Configuration.Fields.Item _
("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] _
=25 
myMail.Configuration.Fields.Update
myMail.Send
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top