Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2008, 09:21
vasquito
 
Fecha de Ingreso: febrero-2008
Mensajes: 11
Antigüedad: 17 años, 2 meses
Puntos: 0
mandar formulario x email

Hola.
Quiero que desde mi pagina se pueda mandar por email un formulario. He buscado por internet algun codigo y he encontrado uno.
En la primera pagina seria:

<form method=post action=sendMailASP.asp>
De: <input type=text name=sender><br>
Para: <input type=text name=receiver><br>
Asunto: <input type=text name=subject><br>
Mensaje: <textarea name=body></textarea><br><br>
<input type=submit value="Enviar mensaje">
</form>
y en la pagina sendMailASP.asp seria

<html>
<head >
<title>Página ASP de prueba para enviar mensajes</title>
</head>
<body>

<%
set mail=server.CreateObject("CDONTS.NewMail")
mail.From= Request("sender") ' like [email protected]
mail.To = Request("receiver") ' like [email protected]
mail.Subject = Request("subject")
mail.Body = Request("body")
mail.BodyFormat = 0 ' 0 = HTML, 1 = Plain
mail.MailFormat = 1 ' 0 = MIME, 1 = Text
mail.Importance = 1 ' 0 =High, 1 = Medium, 2 = Low
mail.Send
set mail=nothing
%>

<p>
<b>Se ha enviado el mensaje:</b><br>
De: <%= Request("sender") %><br>
A: <%= Request("receiver") %><br>
Con el asunto: <%= Request("subject") %>
</p>
</body>
</html>

Desde la pagina funcionaba muy bien. Lo que pasa es que he subido yo esto a mi servidor y no me funciona.
Hayq mirar alguna cosa mas(igual que tenga el servidor algo instalado)?

gracias