J
JERRYB
I am using the Mailmessage class in my VB app. to create and send an
email over SMTP...
Everything works fine on my WinXP development box but when I run the
app on
Windows 2000 server it fails with "could not create cdo.message
object"
Please help, my code is below and like I said it works fine on my XP
machine:
(to,cc,subject and from are passed to the sub)
Dim strHTML As String
Dim newmsg As New MailMessage
newmsg.BodyFormat = MailFormat.Text
newmsg.To = strTo
newmsg.Cc = strCC
newmsg.From = strFrom
newmsg.Subject = Subject
newmsg.Body = Body & vbNewLine & vbNewLine & vbNewLine & vbNewLine &
vbNewLine & vbNewLine & _
" ** This is an automatically generated email, please do not attempt
to send
a reply."
Try
SmtpMail.SmtpServer = "12.4.50.228"
SmtpMail.Send(newmsg)
Catch ex As Exception
AddLog("Email send error @ " & DateTime.Now())
AddLog("Error was: " & ex.Message)
Exit Sub
End Try
email over SMTP...
Everything works fine on my WinXP development box but when I run the
app on
Windows 2000 server it fails with "could not create cdo.message
object"
Please help, my code is below and like I said it works fine on my XP
machine:
(to,cc,subject and from are passed to the sub)
Dim strHTML As String
Dim newmsg As New MailMessage
newmsg.BodyFormat = MailFormat.Text
newmsg.To = strTo
newmsg.Cc = strCC
newmsg.From = strFrom
newmsg.Subject = Subject
newmsg.Body = Body & vbNewLine & vbNewLine & vbNewLine & vbNewLine &
vbNewLine & vbNewLine & _
" ** This is an automatically generated email, please do not attempt
to send
a reply."
Try
SmtpMail.SmtpServer = "12.4.50.228"
SmtpMail.Send(newmsg)
Catch ex As Exception
AddLog("Email send error @ " & DateTime.Now())
AddLog("Error was: " & ex.Message)
Exit Sub
End Try