Im positive the error is happening because im not setting the server name correcty (obviosly), but I need to know how to retreive the current server or an available one. That or a server name that works. Thanks.
This is the e-mailing code:
Dim objMail As New MailMessage()
SmtpMail.SmtpServer = "Any Server" objMail.From = from
objMail.To = toemail
objMail.Subject = subject
objMail.Body = body
SmtpMail.Send(objMail) ***error happens here
the error i receive
-------------------------------------------------
'Could not access 'CDO.Message' object'
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
*to try it yourself add a system.web.dll reference and also add at the top of the code "Imports System.Web.Mail"
____________
thanks again
This is the e-mailing code:
Dim objMail As New MailMessage()
SmtpMail.SmtpServer = "Any Server" objMail.From = from
objMail.To = toemail
objMail.Subject = subject
objMail.Body = body
SmtpMail.Send(objMail) ***error happens here
the error i receive
-------------------------------------------------
'Could not access 'CDO.Message' object'
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
*to try it yourself add a system.web.dll reference and also add at the top of the code "Imports System.Web.Mail"
____________
thanks again