Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/12/2002, 08:47
Avatar de maestro
maestro
 
Fecha de Ingreso: febrero-2002
Ubicación: España
Mensajes: 2.364
Antigüedad: 23 años, 3 meses
Puntos: 1
-- Envias los datos mediante un formlario llamado -- JmailForm.asp

<html>
<head>
<title>emailform</title>
</head>
<body>
<form method="post" action="SendMail.asp">
Complete this form and click the submit-button. We will answer your
questions as soon as possible.
<br><br>
Your name<br>
<input type="text" size="25" name="name"><br>

Your email<br>
<input type="text" size="25" name="email"><br> Recipient email<br>
<input type="text" size="25" name="recipient"><br> State your business<br>
<select name="subject" size="1">
<option value="help">help
<option value="tips">tips
<option value="other">other
</select>
<br> Enter your question<br>
<textarea name="body" cols="40" rows="15" wrap="PHYSICAL"></textarea>
<br>
<input type="submit" value=" Submit ">
</form>
</body>
</html>


Y recoges los datos en otra pagina llamada -- SendMail.asp

<html>
<head>
<title>w3 JMail rocks</title>
</head>

<body>
<p align="center"><font face="Arial, geneva" size="5"> Email Form</font></p>
<%
Name = Request.Form("name")
SenderEmail = Request.Form("email")
Subject = "Regarding " & Request.Form ("subject")
Recipient = Request.Form("recipient")
Body = Request.Form("body")

Set JMail = Server.CreateObject ("JMail.SMTPMail")

' Below you should enter your own SMTP-server
JMail.ServerAddress = "xxx.zzz.yyy"

JMail.Sender = Senderemail
JMail.Subject = Subject

JMail.AddRecipient Recipient

JMail.Body = Body

JMail.Priority = 3

JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")

JMail.Execute
%>
<center>
<font face="Arial, geneva" size="3">
Your email has been sent to<%= Recipient % ><br>
</font>

</center>
</body>
</html>
__________________
Jose Maria Fernandez
[email protected]
Http://www.expansionweb.net