JMail.asp

<% @ Language="JavaScript" %>

<HTML>
<HEAD><TITLE>
Confirmation</TITLE></HEAD>
<BODY>

<H1>Confirmation</H1>

<%

/********** Format for JMail **********/

var income = "";
var strBody = "";
var spc = " ";

/*
Request.
Form("Income") shorten to Request("Income")
means get the Value of the Form Field called Income
which was passed through the
POST Method
*/
if (
Request("Income") == "60_up") income = "$60,000 & above";
if (
Request("Income") == "40_60") income = "$40,000 - $60,000";
if (
Request("Income") == "30_40") income = "$30,000 - $40,000";
if (
Request("Income") == "20_30") income = "$20,000 - $30,000";
if (
Request("Income") == "15_20") income = "$15,000 - $20,000";
if (
Request("Income") == "00_15") income = "$15,000 & below";

strBody += "Below is your registration information." + '\n\n';

strBody += spc + Request("First") + " " + Request("Last") + '\n';
strBody += spc +
Request("Address") + '\n';
strBody += spc +
Request("City") + ", " + Request("State") + " " + Request("Postal") + '\n';
strBody += spc + "Income: " + income + '\n';
strBody += spc + "Age: " +
Request("Age") + " Sex: " + Request("Sex") + '\n\n';

strBody += "Your request has been approved ";
strBody += "and the program is attached to this message.";

/********** End of Format for JMail **********/

/********** JMail **********/

/*
create a new instance of the JMail Object, same idea we use for
var someArray = new Array(); or
var someImage = new Image();
*/
var JMail = Server.
CreateObject("JMail.SMTPMail");

/*
JMail ASP Component Reference
which describes the Methods & Properties of the JMail Object
*/
JMail.ServerAddress = "bermuda.sislands.com";

JMail.Sendername = "Frank Peter";

JMail.Sender = "frank@sislands.com";

JMail.Subject = "Registration Confirmation";

JMail.AddRecipient(Request("Email")); // The e-mail is send to this address

JMail.Body = strBody;

JMail.Priority = 3;

JMail.AddAttachment("s:\\javascript\\week5\\mail\\win98.exe")

JMail.Execute();

/********** End of JMail **********/

%>

<H3>The Confirmation Process has been completed.</H3>

<H3>An e-mail confirmation has been sent to:
<A HREF=mailto:<% = Request("Email") %>?Subject=Registration%20Confirmation>
<
% = Request("Email") %>
</A>.
</H3>

<H4><A HREF="../default.htm">Week 5</A></H4>

</BODY>
</HTML>