Since I haven't worked with ASP.NET for over a year, I forgot what I did when my code worked. It is probably some setting, or whatever, but I cannot remember.
My problem is that on the line below (marked with '<<<') I have the error message "Cannot create ActiveX component."
I use WIndows XP with IIS 5 and the Microsoft Visual Basic .NET (version 2003)
Any help is appreciated.
Sub SendMail(ByVal strContent As String, ByVal strDate As String)
Dim strSubject As String = "Review for - " & strDate
Dim objSendMail = CreateObject("CDONTS.NewMail") '<<< it is here that the problem occurs
Dim HTML As String
'Dim objSendMail As New MailMessage ' NEW
' Set all the properties on the NewMail object
objSendMail.From = conFrom '"Me@my.com"
objSendMail.To = EmailList()
objSendMail.Importance = 1 ' 0: faible 1=normale 2=haute
objSendMail.BodyFormat = 0 '0
objSendMail.MailFormat = 0 '0 - HTML; 1 - PlainText
objSendMail.Subject = strSubject
objSendMail.Body = strContent
'Send the message
js.MsgAlert(Me, "Sent.", "alert")
Catch exc As Exception
js.MsgAlert(Me, "Retry.", "alert")
objSendMail = Nothing