C
chris
hi i am trying to send a mail using C# and asp.net
but i get the following error,
object objMail = Server.CreateObject("CDO.Message");
objMail.From = "(e-mail address removed)";
objMail.To = "(e-mail address removed)";
objMail.Subject = "Simple mail test";
objMail.TextBody = "Hi there; this is a test from the web
server.";
objMail.Fields("urn:schemas:httpmail:importance").Value = 1;
objMail.Fields.Update();
objMail.();
'object' does not contain a definition for 'From'
'object' does not contain a definition for 'To'
'object' does not contain a definition for 'Subject'
and so on
.......
but this works fine in vb.net and asp.net
Dim objMail As Object = Server.CreateObject("CDO.Message")
objMail.From = "(e-mail address removed)"
objMail.To = "(e-mail address removed)"
objMail.Subject = "Simple mail test"
objMail.TextBody = "Hi there; this is a test from the web
server."
objMail.Fields("urn:schemas:httpmail:importance").Value = 1
objMail.Fields.Update()
objMail.()
what do i do?
is it possible to use the cdo.message in c#?
cause everywhere on the net i have seen code for vb.net only and not c#
thanx
Chris
but i get the following error,
object objMail = Server.CreateObject("CDO.Message");
objMail.From = "(e-mail address removed)";
objMail.To = "(e-mail address removed)";
objMail.Subject = "Simple mail test";
objMail.TextBody = "Hi there; this is a test from the web
server.";
objMail.Fields("urn:schemas:httpmail:importance").Value = 1;
objMail.Fields.Update();
objMail.();
'object' does not contain a definition for 'From'
'object' does not contain a definition for 'To'
'object' does not contain a definition for 'Subject'
and so on
.......
but this works fine in vb.net and asp.net
Dim objMail As Object = Server.CreateObject("CDO.Message")
objMail.From = "(e-mail address removed)"
objMail.To = "(e-mail address removed)"
objMail.Subject = "Simple mail test"
objMail.TextBody = "Hi there; this is a test from the web
server."
objMail.Fields("urn:schemas:httpmail:importance").Value = 1
objMail.Fields.Update()
objMail.()
what do i do?
is it possible to use the cdo.message in c#?
cause everywhere on the net i have seen code for vb.net only and not c#
thanx
Chris