ASP Source Code

ASP File: jscript/email/opt.asp

 
   ASP Script
   Comments
   HTML and Text


<%@language=jscript%>
<html>
<head>
<title>Welcome to use Halcyon Email System with IASP</title>
</head>
<body>
<p align=right><A href="email.asp"><STRONG>Go 
Back</STRONG></A></p>
<%
var username , useradd , userpw,inmessages;
if (Request.Form("emailaddress").Count== 0 || Request.Form("password").Count== 0) {
        Response.Write ("You did not fill in either your Email Address or Password, both are required to check your email!") ;
  	Session("Password") = "" ;
  	Session("emailaddress") = "" ;
  	}
else{
  	Session("emailaddress") = Request.Form("emailaddress")(1)
  	Session("Password") = Request.Form("Password")(1)
  	if ( Session("mysession") != null){
  	     Session("mysession").Logoff
    		 Session("mysession") = null;
        }
  	var mysession;  
  	mysession = Server.CreateObject("CDONTS.Session")
  	mysession.LogonSMTP (Session("emailaddress"),Session("emailaddress"),Session("Password"))
        var myinbox;
        myinbox = mysession.GetDefaultFolder(1)

        if ( myinbox == null ) {
              Response.Write("<br>Your mail address or password is invalid, please verify you have entered them correctly!<br>")
  	   Session("mysession") = null;
  	   mysession = null ;
          }
  	else {    

  	var inmessages;
  	var sum;
        inmessages= myinbox.Messages
        sum = inmessages.Count
  	Session("inmessages") = inmessages
  	Session("mysession") = mysession
%>

<table border="0" width="100%">
    <tr>
        <td width="100%"><p align="center"><font face="Verdana"><big><big>Welcome to use Halcyon
        Email System with IASP</big></big></font></p>
        <hr>
        </td>
    </tr>
</table>

<form action="newmail.html">
    <table border="0" width="100%">
        <tr>
            <td width="100%"><div align="center"><center><p><input type="submit" value="Send New Mail"
            name="NewMail"></td>
        </tr>
    </table>
</form>
<%  if( sum > 0){  %>
<form method="post" action="viewmail.asp">
    <table border="0" width="100%">
        <tr>
            <td width="100%"><div align="center"><center><p><input type="submit"
            value="Get and View Mail" name="GetMail"></td>
        </tr>
    </table>
</form>
<%
}
else
{
%>
<p align="center"><font face="Verdana"><big>No new message!!!</big> </font></p>
<%} %>

  <%
    } 
}
%>
<hr>

<p align="center"><u><em>@1998 by Halcyon Corporation. All rights 
reserved</em></u></p>
</body>
</html>