System.Web.Mail - Error

apologies ... this is what I am getting ...

Could not access 'CDO.Message' object.

The code is doing the following ...

Code:
objMSG.From = ConfigurationSettings.AppSettings("EmailTo")
            objMSG.To = ConfigurationSettings.AppSettings("EmailTo")

            ' set the subject and the body
            objMSG.Subject = "Internet Enquiry"
            objMSG.Body = "The following Membership Application has been filled in on the website: " & vbCrLf & vbCrLf & _
                            "Company - " & txtCompany.Text & vbCrLf & _
                            "Name - " & txtName.Text & vbCrLf & _
                            "Email - " & txtEmail.Text & vbCrLf & _
                            "Telephone - " & txtTelephone.Text & vbCrLf & _
                            "Fax - " & txtFax.Text & vbCrLf & _
                            "Address - " & txtAddress.Text & vbCrLf & _
                            "Enquiry - " & txtenquiry.text

            objMSG.BodyFormat = Mail.MailFormat.Html

            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = ConfigurationSettings.AppSettings("SMTPServer")
            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = ConfigurationSettings.AppSettings("SMTPUsername")
            objMSG.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = ConfigurationSettings.AppSettings("SMTPPasswprd")

            ' send the message
            objSMTP.SmtpServer = ConfigurationSettings.AppSettings("SMTPServer")
            objSMTP.Send(objMSG)

The SMTP server ... I take is what I use to connect in Outlook to my mail ... i.e. mail.tomfloate.me.uk??

Also, is the username, the email address I use?

Thanks in advance!
 
At least by posting it you were able to see the error, want me to remove this topic? :D
 
Back
Top