ASP Source Code: iaspmailjs.asp

   ASP Script
   Comments
   HTML and Text

<%@ LANGUAGE=JScript %>
<html>
<head>
<title>Welcome to the Halcyon iASP Email System</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 the Halcyon iASP Email System</big></big></p></big>
<%
Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
if Request.Form("smtpserver") <> ""then
    Mailer.RemoteHost = Request.Form("smtpserver")
end if
if Request.Form("username") <> ""then
    Mailer.UserName = Request.Form("username")
end if
if Request.Form("password") <> ""then
    Mailer.Password = Request.Form("password")
end if
if Request.Form("to") <> "" and Request.Form ("toname") <>""then
    Mailer.AddRecipient Request.Form ("toname"), Request.Form("to")
end if
if Request.Form("cc")<>"" and Request.Form ("ccname")<>""then
    Mailer.AddCC Request.Form ("ccname"),Request.Form("cc")
end if
if Request.Form("bcc")<>""and Request.Form ("bccname")<>""then
    Mailer.AddBCC Request.Form ("bccname"),Request.Form("bcc")
end if
if Request.Form("fromname")<>""then
    Mailer.FromName = Request.Form("fromname")
end if
if Request.Form("fromaddress")<>""then
    Mailer.FromAddress = Request.Form("fromaddress")
end if
if Request.Form("subject")<>""then
    Mailer.Subject = Request.Form("subject")
end if
if Request.Form("bodytext")<>""then
    Mailer.BodyText = Request.Form("bodytext")
end if
if Request.Form("bodytextfromfile")<>""then
    Mailer.GetBodyTextFromFile Request.Form("bodytextfromfile")
end if
if Request.Form("att1")<>""then
    Mailer.AddAttachment Request.Form ("att1")
end if
if Request.Form("att2")<>""then
    Mailer.AddAttachment Request.Form ("att2")
end if
if Request.Form("att3")<>""then
    Mailer.AddAttachment Request.Form ("att3")
end if
if Request.Form("replyto")<>""then
    Mailer.ReplyTo= Request.Form ("replyto")
end if
if Request.Form("smtplog")<>""then
    Mailer.SMTPlog=Request.Form ("smtplog")
end if
if Request.Form ("charset") <> "" then
    Mailer.CharSet = Cint(Request.Form ("charset"))
end if

dim m
m = Mailer.SendMail
if m then
   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>"
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>"
end if
Response.Write "<P align = right><font color =white><a href = iasp_mail.htm>Go Back.</a></p> "
%>

</body>
</html>


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