I am trying to make my program to send an e-mail. I am getting the error "Could not access CDO.Message object".
I am not familiar with CDO. Do I need to add some reference? What should I do?
Dim oMail As New System.Web.Mail.MailMessage
With oMail
.From = "Management_reporting@ubs.com"
.To = "first.last@ubs.com"
.Subject = sFile
Dim myAttachment As System.Web.Mail.MailAttachment = New System.Web.Mail.MailAttachment(sFile)
.Attachments.Add(myAttachment)
End With
System.Web.Mail.SmtpMail.SmtpServer = "NNYCC001PEX1"
System.Web.Mail.SmtpMail.Send(oMail)
I am not familiar with CDO. Do I need to add some reference? What should I do?
Dim oMail As New System.Web.Mail.MailMessage
With oMail
.From = "Management_reporting@ubs.com"
.To = "first.last@ubs.com"
.Subject = sFile
Dim myAttachment As System.Web.Mail.MailAttachment = New System.Web.Mail.MailAttachment(sFile)
.Attachments.Add(myAttachment)
End With
System.Web.Mail.SmtpMail.SmtpServer = "NNYCC001PEX1"
System.Web.Mail.SmtpMail.Send(oMail)