<head>
<title></title>
</head>
<body>
<CENTER><H2>Enviar formulario por e-mail</H2></CENTER>
<%
'Plantilla ASP por Carlos de la Orden Dijs
Dim oMail, sDestino, sRemite, sBody, accion
sDestino=Trim(CStr(Request.Form("Para")) )
sRemite=Trim(CStr(Request.Form("De")))
sBody=CStr(Request.Form("Cuerpo"))
' Si alguno de los campos está vacío es que no han enviado el formulario
if (sDestino = "" or sRemite = "") then
Formulario
else
MandarMail
end if
'================================================= =======================================
Sub Formulario
%>
<TABLE BORDER="0" STYLE="background-color: lightgrey; color: black" WIDTH="227" ALIGN="center">
<FORM NAME="Email" ACTION="formemail.asp" METHOD="post">
<TR>
<TD bordercolor="#FFFFFF" bgcolor="#FFFFFF" width="219"><b>Para:</b><br>
<INPUT TYPE="text" NAME="Para"><br>
<b>De:</b><br>
<INPUT TYPE="text" NAME="De"></TD>
<TR>
<TD bordercolor="#FFFFFF" bgcolor="#FFFFFF" width="219">
<p align="left"><TEXTAREA NAME="Cuerpo" WRAP="virtual" ROWS="5" COLS="25"></TEXTAREA><br>
<INPUT TYPE="submit" VALUE="Enviar Email!"><INPUT TYPE="reset">
</p>
</TD>
<TR>
</FORM>
</TABLE>
<%
End Sub 'Formulario
'================================================= =======================================
Sub MandarMail
set oMail=Server.CreateObject("CDONTS.NewMail&quo t;)
oMail.To=sDestino
oMail.From=sRemite
sBody=sBody & VbCrLf & VbCrLf & _
""
sBody=sBody & ""
sBody=sBody & ""
oMail.Body=sBody
'Y fuera!
oMail.Send
'Sacamos la basura
set oMail=nothing
Response.Write("El correo electrónico ha sido enviado correctamente a <i>"&sDestino&"</i>.")
End Sub 'MandarMail
%>
<!--FIN DEL SCRIPT -->