ASP Source Code

ASP File: iaspmailvb.asp

 
   ASP Script
   Comments
   HTML and Text

<%@ Language=VBScript %>
<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.jpg 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>
<%
Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
if Request.Form("smtpserver") <> ""then
    Mailer.RemoteHost = Request.Form("smtpserver")
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
'Mailer.CharSet = cint(Request.Form ("charset"))
'Response.Write Request.Form ("Charset")
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>"
   '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> "
end if
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>