Extreme Web

support

Using Jmail to Send Emails from the Web


mailform.asp - the form filled out by visitors

<html>

<head>
<title>Email Form</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>





sendmail.asp - script to send email and confirm to visitor

<html>

<head>
<title>Sending Email</title>
</head>

<body>
<p align="center"><font face="Arial, geneva" size="5">Email Form<br>
</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")

JMail.ServerAddress = "jmail.extremeweb.com"

JMail.Sender = Senderemail
JMail.SenderName = Name
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>