Email error -- CDO.Message Object, could not access

C

Charles

Can anyone help me with this error.
"Could not access 'CDO.Message' object."

This is from the: "SmtpMail.Send(mailMsg)" command.
 
C

Charles Wildner

ok,

Dim mailMsg As New MailMessage()
With mailMsg
.From = txtFrom.Text.Trim
.To = txtTo.Text.Trim
.Cc = txtCC.Text.Trim
.Bcc = txtBCC.Text.Trim
.Subject = txtSubject.Text.Trim
.Body = sb.ToString
.Priority = CType(cboPriority.SelectedIndex, MailPriority)

If Not IsNothing(arlAttachments) Then
Dim mailAttachment As Object
For Each mailAttachment In arlAttachments
.Attachments.Add(mailAttachment)
Next
End If
End With

SmtpMail.SmtpServer = "127.0.0.1"
' " I have tried SmtpMail.SmtpServer = weiserver, localhost, smarthost,
and 127.0.0.1 "
SmtpMail.Send(mailMsg)

always the same error and my default SMTP virtual server is running.
 
M

MS News \(MS ILM\)

Agusitn,

You are the best.
Thank you. How did you come up with this?
What is the reasoning behind it working.
Is this a SmtpServer Collection that the system will try until it finds a
good one??

Thanks
 
A

Agusitn Rodriguez

How did you come up with this? & What is the reasoning behind it working.
- Well the way I figure is that since insert is an inherited method from
string class it would be like accessing and updating the property value from
within

Is this a SmtpServer Collection that the system will try until it finds a
good one??
No, But but you can handle exceptions and have the property updated to the
next server on a list and retry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top