JScript Sample: jscript/email/newmail.asp
ASP Script
Comments or Client-side Script
HTML and Text

<%@ Language=JScript %>
<HTML>
<HEAD>
</HEAD>
<BODY>
<DIV align=right><A href="newmail.html"><STRONG>Go Back</STRONG></A></DIV>
<%
   var mail
   if ((Request.Form("ToAddress").Count !=0) && (Request.Form("Subject").Count !=0) && (Request.Form("FromAddress").Count !=0)) {
      var newMail
      newMail = Server.CreateObject("CDONTS.NewMail")
      newMail.Subject = Request.Form("Subject")
      newMail.To = Request.Form("ToAddress")

      if (Request.Form("CcAddress") != "")
         newMail.Cc = Request.Form("CcAddress")
      }

      if (Request.Form("BccAddress") != "")
         newMail.Bcc = Request.Form("BccAddress")
      }
      if (Request.Form("Attach") != "" )
               newMail.AttachFile(Request.Form("Attach"))
      }
      newMail.BodyFormat =Request.Form("BodyFormat")
      newMail.From = Request.Form("FromAddress")
      newMail.Importance = Request.Form("Importance")
      newMail.Body = Request.Form("Body")
      newMail.Send
      newMail = null
      Response.Write ("<p> Mail sent successfully.")

   }
%>

<P></P>
<P align=right></P>

</BODY>
</HTML>


Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.