ASP Source Code
ASP File: iaspmailjs.asp
ASP Script
Comments
HTML and Text
<%@ Language=JScript %>
<HTML>
<HEAD>
<title>Welcome to use Halcyon Email System with iASP</title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY background=Teak.gif bgColor=blue aLink=blue link=white text=white vLink=greenyellow><big>
<!--------------------------------------------------------------------->
<p align="center"><big><big
style="COLOR: mintcream">Welcome to use Halcyon iASPMaill System</big></big></p></big>
<%
var Mailer
Mailer = Server.CreateObject("SMTPsvg.Mailer")
if (Request.Form("smtpserver").Count !=0)
Mailer.RemoteHost = Request.Form("smtpserver")
if ((Request.Form("to").Count !=0) && (Request.Form ("toname").Count !=0))
Mailer.AddRecipient( Request.Form ("toname"), Request.Form("to"))
if ((Request.Form("cc").Count!=0) && (Request.Form ("ccname").Count!=0))
Mailer.AddCC( Request.Form ("ccname"),Request.Form("cc"))
if ((Request.Form("bcc").Count!=0)&& (Request.Form ("bccname").Count!=0))
Mailer.AddBCC( Request.Form ("bccname"),Request.Form("bcc"))
if (Request.Form("fromname").Count!=0)
Mailer.FromName = Request.Form("fromname")
if (Request.Form("fromaddress").Count!=0)
Mailer.FromAddress = Request.Form("fromaddress")
if (Request.Form("subject").Count!=0)
Mailer.Subject = Request.Form("subject")
if (Request.Form("bodytext").Count!=0)
Mailer.BodyText = Request.Form("bodytext")
if (Request.Form("bodytextfromfile").Count!=0)
Mailer.GetBodyTextFromFile (Request.Form("bodytextfromfile"))
if (Request.Form("att1").Count!=0)
Mailer.AddAttachment( Request.Form ("att1"))
if (Request.Form("att2").Count!=0)
Mailer.AddAttachment (Request.Form ("att2"))
if (Request.Form("att3").Count!=0)
Mailer.AddAttachment (Request.Form ("att3"))
//'Mailer.CharSet = Request.Form ("charset")
//'Response.Write Request.Form ("Charset")
if (Mailer.SendMail){
Response.Write ("<br><br><br><br><br><br>")
Response.Write ("<p align = center><font color = white>Mail sent...</p>")
Response.Write ("<p align = center>Mail sent successful" + "</p>")
//'Response.Write "<P align = right><font color =white><a href = iASPMail.html>Go Back.</a></p> "
}else{
Response.Write ("<p align = center>Mail failure. Check mail host server name and tcp/ip connection...<br>")
Response.Write ("<p align =center>" + Mailer.Response + "</p>")
//'Response.Write "<P align = right><font color =white><a href = iASPMail.html>Go Back.</a></p> "
}
Response.Write ("<P align = right><font color =white><a href = iASPMail.html>Go Back.</a></p> ")
//'Response.write "<p align =center><font color = white> successful</p></font>"
%>
</BODY>
</HTML>