Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2012, 16:07
razer
 
Fecha de Ingreso: marzo-2008
Mensajes: 237
Antigüedad: 16 años, 2 meses
Puntos: 6
Problema al enviar mail

Buenas, tengo el siguiente codigo (mezclado entre codigo html y demas):

Cita:
<%
using System.Web.Mail;

string ToMail = "[email protected]";
string From = "[email protected]";
string Subject = "The Famous";
string Body = "Hello World";

SmtpMail.Send(From,ToMail,Subject,Body);

%>
No me compila porque me dice que "using System.Web.Mail;" is a namespace and cannot be used as an expression.
Que me esta faltando ???

El error completo es este:
Cita:
C:\TEMP13\EnviarMail.aspx(41) : error BC36008: 'Using' must end with a matching 'End Using'.

using System.Web.Mail;
~~~~~~~~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30112: 'System.Web.Mail' is a namespace and cannot be used as an expression.

using System.Web.Mail;
~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30037: Character is not valid.

using System.Web.Mail;
~
C:\TEMP13\EnviarMail.aspx(43) : error BC30287: '.' expected.

string ToMail = "[email protected]";
~~~~~~
C:\TEMP13\EnviarMail.aspx(44) : error BC30287: '.' expected.

string From = "[email protected]";
~~~~
C:\TEMP13\EnviarMail.aspx(45) : error BC30287: '.' expected.

string Subject = "The Famous";
~~~~~~~
C:\TEMP13\EnviarMail.aspx(46) : error BC30287: '.' expected.

string Body = "Hello World";
~~~~
C:\TEMP13\EnviarMail.aspx(48) : error BC30037: Character is not valid.

SmtpMail.Send(From,ToMail,Subject,Body);
Ayuda!