Sunteți pe pagina 1din 69

1.

INTRODUCTION

Today almost all people use internet for sending & receiving mails .There are many mail servers available like Yahoo! Mail,Gmail rediffmail etc.This Project is similar to general mail servers. It provides facilities like send, receive mails, address book, sent mails etc. The GUI of this mail server is very user friendly and similar to that of other mail server. New user need to fill the registration form for use of mail server. Once registration is done, user can access his account using username and password. Mails received by the user are stored in inbox. Similarly sent mails are store in sent box. User can compose mail by using compose facility.Other functionality like change password, forget password, address book, logout are also available for user.

2. SOFTWARE REQUIREMENT SPECIFICATION


Software Requirements :
Operating System User Interface Client-side Scripting Programming Language Web Applications IDE/Workbench Database : : : : : : : Windows XP or higher HTML, CSS, Swing JavaScript Java Servlets, JSP NetBeans 7.1 Microsoft Office Access 2007

Hardware Requirements :
Processor Hard Disk RAM : : : Pentium IV 40GB 256MB

3 . SYSTEM DESIGN

3.1Data Flow Diagram

New User

1.0 Fill registration form

1.2 Login form

Registration

Registered User

1.1 Forgot password form

1.3 Check inbox

Login

1.4 Send mails

Mail transaction

1.5 Delete mails

1.6 Logout

3.2 Entity Relationship Diagram

User

n gi Lo

Server

s re to S ck he C

te ele D

Mail a/c

nd Se o T

Mails

n tai n Co

3.3 Sequence Diagram

Login in mail account:-

User Login

Login Screen

Server

Database

Login information Verification Verification Failed Login cancel Verification conform Login conform

<<Sequence 2>>

Logout Process:-

Login cancel

User Logout

Logout Screen

Server

Save Information Conform Logout

Redirect to Home Page

Process of Mail Server:-

Login cancel

User Check Inbox

User Mail a/c Screen

Server

Database

Search for Inbox Search for Query Compose Mails Display Result

Save Mail Go To Server Delete Mails Delete and Update Database

Transfer to the Users Database

<<Sequence >>

3.4 Use Case Diagram

Login

Maintain a/c

Check mails

Send items User Delete folder Server

Logout

4.CODING:

HTML PAGES CODING:

1.Address:
<HTML> <HEAD> <script> function chk() { var fnm=document.frm.Fname.value; var lnm=document.frm.Lname.value; var email=document.frm.Email.value; var phone=document.frm.Phone.value; var exp2=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\. [a-zA-z0-9]{2,4}$/; var exp1=/^[0-9]+$/; var nickname=document.frm.Nickname.value; if(fnm==""){ alert("First Name should not be empty"); document.frm.Fname.focus(); return; }//if

10

if(lnm == ""){ alert("Last name should not be empty"); document.frm.Lname.focus(); return; }//if if(nickname==""){ alert("Nick Name should not be empty"); document.frm.Nickname.focus(); return; }//if if(email== ""){ alert(" Email should not be empty"); document.frm.Email.focus(); return; }//if else { if(!document.frm.Email.value.match(exp2)) { alert("Please Enter Valid e-Mail Address"); document.frm.Email.focus(); return; } }//else if(phone== ""){ alert("Phone should not be empty"); document.frm.Phone.focus(); return; }//if else { if(!document.frm.Phone.value.match(exp1)) { alert("Enter Valid Telephone Number Plaese"); document.frm.Phone.focus(); return; } } 11

frm.submit(); }//function valuser </script> <TITLE>Address Book</TITLE> </HEAD> <BODY> <H1>Address Book</H1> <HR> <P> This is an address book where you can add your contacts...</P> <FORM name="frm" action="/project/MailServlet" method="get"> Please provide the following contact information:</P> <BLOCKQUOTE> <TABLE height="160" width="289"> <TR> <TD height="23" width="94"> <EM style="font-style: normal">First Name<b> </b></EM></TD> <TD height="23" width="185"> <INPUT TYPE=TEXT NAME="Fname" SIZE=25> </TD> </TR> <TR> <TD height="28" width="94"> &nbsp;</TD> <TD height="28" width="185"> &nbsp;</TD> </TR> <TR> <TD height="43" width="94"> <EM style="font-style: normal">Last Name</EM></TD> <TD height="43" width="185"> <INPUT TYPE=TEXT NAME="Lname" SIZE=25> </TD> 12

</TR> <tr> <TD height="23" width="94"> &nbsp;</TD> <TD height="23" width="185"> &nbsp;</TD> </tr> <tr> <TD height="23" width="94"> <p align="left">Nickname</TD> <TD height="23" width="185"> <INPUT TYPE=TEXT NAME="Nickname" SIZE=25></TD> </tr> <tr> <TD height="23" width="94"> <p align="left">&nbsp;</TD> <TD height="23" width="185"> &nbsp;</TD> </tr> <tr> <TD height="23" width="94"> <p align="left"> <EM style="font-style: normal">E-mail</EM></TD> <TD height="23" width="185"> <INPUT TYPE=TEXT NAME="Email" SIZE=25> </TD> </tr> <TR> <TD height="23" width="94"> &nbsp;</TD> <TD height="23" width="185"> &nbsp;</TD> </TR> <TR> <TD height="23" width="94"> <p align="left"> <EM style="font-style: normal">Phone</EM></TD> <TD height="23" width="185"> <INPUT TYPE=TEXT NAME="Phone" SIZE=25></TD> </TR>

13

</TABLE> </BLOCKQUOTE> <HR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp; <input type="hidden" name="action" value="add"> <INPUT TYPE="BUTTON" VALUE="Submit" name="submit" Onclick="chk();"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <INPUT TYPE=RESET VALUE="Reset Form"> </FORM> <HR>

</BODY> </HTML> --------------------------------------------------------------------------------------

2.Address book:
<html> <head> <title>Address Book</title> <script> function chk() { var fnm=document.frm.Fname.value; var lnm=document.frm.Lname.value; var email=document.frm.Email.value; var phone=document.frm.Phone.value; var exp2=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\. [a-zA-z0-9]{2,4}$/; 14

var exp1=/^[0-9]+$/; var nickname=document.frm.Nickname.value; if(fnm==""){ alert("First Name should not be empty"); document.frm.Fname.focus(); return; }//if

if(lnm == ""){ alert("Last name should not be empty"); document.frm.Lname.focus(); return; }//if if(nickname==""){ alert("Nick Name should not be empty"); document.frm.Nickname.focus(); return; }//if if(email== ""){ alert(" Email should not be empty"); document.frm.Email.focus(); return; }//if else { if(!document.frm.Email.value.match(exp2)) { alert("Please Enter Valid e-Mail Address"); document.frm.Email.focus(); return; } }//else if(phone== ""){ alert("Phone should not be empty"); document.frm.Phone.focus(); return; 15

}//if else { if(!document.frm.Phone.value.match(exp1)) { alert("Enter Valid Telephone Number Plaese"); document.frm.Phone.focus(); return; } }

frm.submit(); }//function valuser </script> </head> <body> <h1>Address Book</h1> <hr> <p><b><font size="4">This is an address book where you can add your contacts...</font></b></p> <form name="frm" action="/project/MailServlet" method="get"> <p>&nbsp;</p> <p><b>Please provide the following contact information:</b></p> <p></p> <blockquote> <table height="160" width="289"> <tr> <td height="23" width="94"><em style="font-style: normal">First Name<b> </b></em></td> <td height="23" width="185"><input TYPE="TEXT" NAME="Fname" SIZE="25"> </td> </tr> <tr> <td height="28" width="94">&nbsp;</td> <td height="28" width="185">&nbsp;</td> </tr> <tr> 16

<td height="43" width="94"><em style="font-style: normal">Last Name</em></td> <td height="43" width="185"><input TYPE="TEXT" NAME="Lname" SIZE="25"> </td> </tr> <tr> <td height="23" width="94">&nbsp;</td> <td height="23" width="185">&nbsp;</td> </tr> <tr> <td height="23" width="94"> <p align="left">Nickname</td> <td height="23" width="185"> <input TYPE="TEXT" NAME="Nickname" SIZE="25"></td> </tr> <tr> <td height="23" width="94"> <p align="left">&nbsp;</td> <td height="23" width="185">&nbsp;</td> </tr> <tr> <td height="23" width="94"> <p align="left"><em style="font-style: normal">Email</em></td> <td height="23" width="185"><input TYPE="TEXT" NAME="Email" SIZE="25"> </td> </tr> <tr> <td height="23" width="94">&nbsp;</td> <td height="23" width="185">&nbsp;</td> </tr> <tr> <td height="23" width="94"> <p align="left"><em style="font-style: normal">Phone</em></td> <td height="23" width="185"><input TYPE="TEXT" NAME="Phone" SIZE="25"></td> </tr> </table> </blockquote> <hr> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <input type="hidden" name="action" value="add"> <button name="B1" onClick="chk()">Save Address </button> 17

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input TYPE="RESET" VALUE="Reset Form"> </p> </form> <hr>

</body> </html> -----------------------------------------------------------

3.Compose mail:
<html> <head> <meta http-equiv='Content-Language' content='en-us'> <script> function check() { var To=document.frm.To.value; var sub=document.frm.Sub.value; var desc = document.frm.Desc.value; var exp=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z09]{2,4}$/;

if(To== ""){ alert(" To field should not be empty"); document.frm.To.focus(); 18

return; }//if else { if(!document.frm.To.value.match(exp)) { alert("Please Enter Valid e-Mail Address"); document.frm.To.focus(); return; } } if(sub== ""){ alert(" subject field should not be empty"); document.frm.sub.focus(); return; }//if

if(desc== ""){ alert("Description Field should not be empty"); document.frm.desc.focus(); return; }//if

document.frm.submit(); } </script> <title>Compose</title> </head> <body> <form name ='frm' method='get' action='/project/MailServlet'> <p>&nbsp;</p> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' 19

width='85%' id='AutoNumber1' height='203'> <tr> <td width='8%' height='19'>To :</td> <td width='92%' height='19'><input type='text' name='To' size='31'></td> </tr> <tr> <td width='8%' height='18'>Subject</td> <td width='92%' height='18'><input type='text' name='Sub' size='56'></td> </tr> <tr> <td width='8%' height='124' align="left" >Description</td> <td width='92%' height='124'><textarea rows='10' name='Desc' cols='51'></textarea></td> </tr> </table> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type='hidden' name='action' value="Compose"> <input type='button' value='Send' name='btn_send' onclick='check();'> <input type='button' value='Discard' name='btn_discard'> <input type='reset' value='Reset' name='btn_reset'></p> </form>

</body> </html>

4.Forgot password:
<html> 20

<head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <script> function val() { var exp=/^[A-Z,a-z]+$/; var uid = document.frm.uid.value; var ans =document.frm.ans.value; if(uid == "") { alert(" User Id should not be empty"); document.frm.uid.focus(); return; }//if else{ var ulen=uid.length; if(ulen<5){ alert("length of user id should not minimum than 5"); return; }//if }//else

if(ans== ""){ alert(" Answer should not be empty"); document.frm.ans.focus(); return; }//if else { if(!(ans.match(exp))) { 21

alert("Please Enter Valid answer"); document.form.ans.focus(); return false; } }

frm.submit(); } </script> </head> <body> <p>&nbsp;</p> <form name="frm" action="/project/MailServlet" method="get"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="65%" id="AutoNumber1" name="tab1"> <tr> <td width="27%"><b>Enter User ID</b></td> <td width="73%"><input type="text" name="uid" maxlength="15" size="27"> @Earthmail.com</td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%"><b>Enter Question</b></td> <td width="73%"> <select name="ques" maxlength="40"> <option value="Name of pet" selected> Name of pet</option> <option value="Favourite leader"> Favourite leader</option> <option value="Nick Name "> What is your nick name</option> </select> </td> 22

</tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%"><b>Answer&nbsp; </b></td> <td width="73%"><input type="text" name="ans" maxlength="15" size="22"></td> </tr> </table> <input type="hidden" name="action" value="FP"> <p></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value="submit" onClick="val();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp; </p> </form>

</body> </html> -----------------------------------------------------------

5. Index:
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> 23

<meta name="ProgId" content="FrontPage.Editor.Document"> <title>New Page 1</title> </head> <frameset rows="85,*" framespacing="0" border="0" frameborder="0"> <frame name="banner" scrolling="no" noresize target="contents" src="index1.htm"> <frameset cols="187,*"> <frame name="contents" target="main" src="Menu2.htm" scrolling="auto"> <frame name="f2" scrolling="auto" src="f2.htm"> </frameset> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes> </frameset> </html>

6. Login:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE>Log In</TITLE> </style></head> <script> function valUser(){ var user = document.form1.user.value; 24

var pwd =document.form1.pwd.value; if(user == ""){ alert(" User Id should not be empty"); document.form1.user.focus(); return; }//if else{ var ulen=user.length; if(ulen<5){ alert("length of user id should not minimum than 5"); return; }//if }//else if(pwd== ""){ alert(" Password should not be empty"); document.form1.pwd.focus(); return; }//if else{ var plen=pwd.length; if(plen < 6){ alert("length of password should not minimum than 6"); return; }//if }//else form1.submit(); }//function valuser </script> <META name="GENERATOR" content="Created by BlueVoda"> </HEAD> <BODY background="back67_10.jpg" bgcolor="#FFFFFF" text="#000000"> <form name="form1" action="/project/MailServlet" method="get"> <INPUT type="password" style="position:absolute;left:756px;top:301px;width:176px;z -index:0" size="22" name="pwd" value=""> <INPUT type="text" style="position:absolute;left:754px;top:257px;width:176px;z 25

-index:1" size="22" name="user" value=""> <INPUT type=hidden name='action' value='L'> <INPUT type="button" name="sign_in" value="Sign In" style="position:absolute;left:757px;top:393px;width:74px;he ight:29px;z-index:2" onClick="valUser();"> <DIV style="position:absolute;left:671px;top:258px;width:77px;he ight:16px;z-index:3" align="left"> <FONT style="font-size:13px" color="#FFFFFF" face="MS Reference Sans Serif"><B>Username</B></FONT> </DIV> <DIV style="position:absolute;left:672px;top:304px;width:77px;he ight:16px;z-index:4" align="left"> <FONT style="font-size:13px" color="#FFFFFF" face="MS Reference Sans Serif"><B>Password</B></FONT> </DIV> <DIV style="position:absolute;left:660px;top:451px;width:134px;h eight:32px;z-index:5" align="left"> <FONT style="font-size:13px" color="#FFFFFF" face="Microsoft Sans Serif"><B><a href='/project/pages/forget.html'>Forgot&nbsp; password ? </a></B></FONT> </DIV> <DIV style="position:absolute;left:682px;top:526px;width:264px;h eight:25px;z-index:8" align="left"> <FONT style="font-size:21px" color="#C0C0C0" face="Microsoft Sans Serif"><B><U><a href="/project/pages/registration.html">SIGN UP!!! </a></U></B></FONT><FONT style="font-size:13px" color="#C0C0C0" face="Microsoft Sans Serif"><B> here for EARTH ID</B></FONT> </DIV>

</BODY> </HTML>

26

-----------------------------------------------------------

7. Registration:
<html> <head> <title> Registration form </title> <script> function valUser(){ var exp=/^[A-Z,a-z]+$/; var exp1=/^[0-9]+$/; var exp2=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9] {2,4}$/; var var var var var var var var var fnm=document.frm.fname.value; lnm=document.frm.lname.value; uid = document.frm.uid.value; pwd = document.frm.pwd.value; cpwd=document.frm.cpwd.value; city=document.frm.city.value; ans =document.frm.ans.value; zip=document.frm.zip.value; add=document.frm.add.value; if(fnm==""){ alert("First Name should not be empty"); document.frm.fname.focus(); return; }//if else { if(!(fnm.match(exp))) { alert("Please Enter Valid First Name"); document.form.fname.focus(); return false; } } 27

if(lnm == ""){ alert("Last name should not be empty"); document.frm.lname.focus(); return; }//if else { if(!(lnm.match(exp))) { alert("Please Enter Valid Last Name"); document.form.lname.focus(); return false; } }

if(uid == ""){ alert(" User Id should not be empty"); document.frm.uid.focus(); return; }//if else{ var ulen=uid.length; if(ulen<5){ alert("length of user id should not minimum than 5"); return; }//if }//else if(pwd== ""){ alert(" Password should not be empty"); document.frm.pwd.focus(); return; }//if else{ var plen=pwd.length; 28

if(plen < 6){ alert("length of password should not minimum than 6"); return; }//if }//else if(cpwd== ""){ alert(" Confirm Password should not be empty"); document.frm.cpwd.focus(); return; }//if if(ans== ""){ alert(" Answer should not be empty"); document.frm.ans.focus(); return; }//if else { if(!(ans.match(exp))) { alert("Please Enter Valid answer"); document.form.ans.focus(); return false; } }

if(add== ""){ alert("Address should not be empty"); document.frm.add.focus(); return; }//if else { if(!(add.match(exp))) { alert("Please Enter Valid address"); document.form.add.focus(); return false; 29

} }

if(city== ""){ alert(" City should not be empty"); document.frm.city.focus(); return; }//if else { if((!city.match(exp))) { alert("Please Enter Valid city"); document.form.city.focus(); return false; } } if(zip== ""){ alert("Zip code should not be empty"); document.frm.zip.focus(); return; }//if else { if(!(zip.match(exp1))) { alert("Please Enter Valid zip code"); document.form.zip.focus(); return false; } }

if(pwd!=cpwd){ alert("Password does not matchwith confirm password"); document.frm.zip.focus(); return; }//if

30

frm.submit(); }//function valuser </script> </head> <body> <h1> Registration Details</h1> <p> <b>Enter all details</b></p> <form name="frm" action="/project/MailServlet" method="get"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="65%" id="AutoNumber1" name="tab1"> <tr> <td width="27%">First Name :</td> <td width="73%"> <input type="text" name="fname" maxlength="15" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Last Name :</td> <td width="73%"><input type="text" name="lname" maxlength="15" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">User id : </td> <td width="73%"> <input type="text" name="uid" maxlength="20" size="20"> @ Earthmail.com</td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Password :</td> <td width="73%"> <input type="password" name="pwd" size="20" maxlength="20"></td> </tr> 31

<tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Confirm Password :</td> <td width="73%"><input type="Password" name="cpwd" size="20" maxlength="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">question :</td> <td width="73%"> <select name="ques" maxlength="40"> <option value=" Name of pet"> Name of pet</option> <option value="Favourite leader"> Favourite leader</option> <option value="Nick Name "> What is your nick name</option> </select></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Answer :</td> <td width="73%"> <input type="text" name="ans" maxlength="20" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Address :</td> <td width="73%"> <textarea rows="3" cols="30" name="add" maxlength="50"> </textarea></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">City :</td> 32

<td width="73%"> <input type="text" name="city" size="15" maxlength="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">zip code : </td> <td width="73%"> <input type="text" name="zip" maxlength="6" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%">Gender :</td> <td width="73%"> <input type=radio name="gender" value="Male" checked>Male&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; <input type=radio name="gender" value="Female">Female</td> </tr> </table> <input type="hidden" name="action" value="new"> <p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp; <input type="button" value="submit" onClick="valUser();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp; <input type="reset">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp; <input type="button" value="Cancel" name="B3" ></p> </form>

33

</body> </html> ----------------------------------------------------------

8. Settings:
<html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Settings</title> <script> function valUser(){ var cpwd = document.frm.cpwd.value; var npwd=document.frm.npwd.value; var rpwd = document.frm.rpwd.value; if(cpwd== ""){ alert(" Current Password should not be empty"); document.frm.cpwd.focus(); return; }//if else{ var plen=cpwd.length; if(plen < 6){ alert("length of current password should not minimum than 6"); return; 34

}//if }//else

if(npwd== ""){ alert(" New Password should not be empty"); document.frm.npwd.focus(); return; }//if else{ var plen=npwd.length; if(plen < 6){ alert("length of New password should not minimum than 6"); return; }//if }//else if(rpwd== ""){ alert(" Re-Enter Password should not be empty"); document.frm.rpwd.focus(); return; }//if

if(npwd!=rpwd){ alert("New Password does not matchwith Re-enter password"); document.frm.rpwd.focus(); return; }//if

frm.submit(); }//function valuser </script> </head> <body>

35

<p>&nbsp;</p> <p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b>&nbsp;</p> <form name="frm" action="/project/MailServlet" method="get"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="65%" id="AutoNumber1" name="tab1"> <tr> <td width="27%"><b>Current Password:&nbsp; </b></td> <td width="73%"><input type="password" name="cpwd" maxlength="15" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%"><b>New Password:&nbsp; </b></td> <td width="73%"><input type="password" name="npwd" maxlength="15" size="20"></td> </tr> <tr> <td width="27%">&nbsp;</td> <td width="73%">&nbsp;</td> </tr> <tr> <td width="27%"><b>Re-Enter Password:&nbsp; </b></td> <td width="73%"><input type="password" name="rpwd" maxlength="15" size="20"></td> </tr> </table> <input type="hidden" name="action" value="CP"> <p></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value="submit"onclick="valUser();">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <input type="reset">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp; </p> </form>

36

</body> </html>

JAVA CODING:
import java.io.IOException; import java.io.PrintWriter; import java.rmi.ServerException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.SimpleDateFormat; 37

import java.util.Date; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class MailServlet extends HttpServlet { public void init(ServletConfig config) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con DriverManager.getConnection("jdbc:odbc:email"); ServletContext cxt = config.getServletContext(); cxt.setAttribute("CON", con); } catch (Exception e) { // TODO: handle exception System.out.print("Amol"); e.printStackTrace(); }// catch }// init public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServerException, IOException { String action = req.getParameter("action"); HttpSession ses = req.getSession(); res.setContentType("text/html"); PrintWriter out = res.getWriter(); ResultSet r = null; Statement st= null; Connection con = null; try { // login int cnt=0; if (action.equals("L")) { // validate user String user = req.getParameter("user"); String pwd = req.getParameter("pwd"); // Connection con = (Connection) 38 =

// getServletContext().getAttribute("CON"); try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = null; String qry="select count(*) from login where user ='" + user+ "'and pass='"+pwd+"'"; st = con.createStatement(); r=st.executeQuery(qry); r.next(); cnt=r.getInt(1); if (cnt==1) { ses.putValue("USR", user); action="I"; res.sendRedirect("/project/pages/index.html"); }// if validate else{ out.println("<h1> Sorry wrong user </h1>"); } }//try catch(Exception e1){e1.printStackTrace();} finally { r.close(); st.close(); con.close(); } }//if for 'L's if (action.equals("new")) { int i=0; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con= DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String fnm=req.getParameter("fname"); String lnm=req.getParameter("lname"); 39

String uid=req.getParameter("uid"); String pwd=req.getParameter("pwd"); String cpwd=req.getParameter("cpwd"); String ques=req.getParameter("ques"); String ans=req.getParameter("ans"); String add=req.getParameter("add"); String city=req.getParameter("city"); String zip=req.getParameter("zip"); String gender=req.getParameter("gender"); if(gender.equals("Male")){ gender="M"; }else{ gender="F"; } String qry1="select count(*) from login where user='"+uid+"'"; r=st.executeQuery(qry1); r.next(); i = r.getInt(1); if(i!=0) { out.println("<h1>User Already Exist</h1><p>"); out.println("<b><a href=/project/pages/registration.html>Click Here</a></b>"); }//if else{ String qry="insert into login values('"+ uid +"','"+pwd+"','" + fnm +"','"+lnm+"','"+add+"','"+city+"','"+gender+"','"+zip+"','"+ques+"','"+ans+"')"; st.executeUpdate(qry); res.sendRedirect("/project/pages/index.html"); ses.putValue("USR", uid); res.sendRedirect("/project/MailServlet?action=I"); }//else }//try catch(Exception e1){e1.printStackTrace();} finally { r.close(); st.close(); 40

con.close(); } }//if for new user if(action.equals("I")) { try{ String usr = (String) ses.getValue("USR"); // Connection con = (Connection) // getServletContext().getAttribute("CON"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String qry="select * from `box` where `Too`='"+usr+"@earthmail.com'"; r = st.executeQuery(qry); StringBuffer wel=new StringBuffer(); wel.append("Welcome "); wel.append(usr); out.println("<html> <b>"+wel+"</b>"); out.println("<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inbox</b><p>"); out.println("<body>"); out.println("<table border='2' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber1'>"); out.println("<tr>"); //out.println("<td width='2%'><input type='checkbox' name='check'></td>"); out.println("<td width='55%'><b>From</td></b>"); out.println("<td width='50%'><b>Subject</td></b>"); //out.println("<td width='20%'><b>Date/Time</td></b>"); out.println("</tr>"); //r.last();

41

while (r.next()) { out.println("<tr>"); //out.println("<td width='2%'><input type='checkbox' name='check'>");// value="+r.getString(6)+"></td>"); out.println("<td width='50%'><a href='/project/MailServlet? action=DM&id="+ r.getString(2)+ "'> "+ r.getString(3)+ "</a></td>"); out.println("<td width='50%'>" + r.getString(2) + " </td>"); //out.println("<td "</td></b>"); out.println("</tr>"); if(r.isFirst()) { break; } r.previous(); }// while out.println("</table>"); out.println("</body>"); out.println("</html>"); }//try catch (Exception e) { // e.printStackTrace(); } }//if of inbox if(action.equals("DM")) { String id = req.getParameter("id"); String tt = req.getParameter("tt"); ResultSet rr=null; out.println("<b>Inbox</b>"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); width='20%'> " + r.getString(6) +

42

String qry="select * from box where Frm='"+ id +"' and Dt='"+tt+ "'"; rr=st.executeQuery(qry); rr.next(); out.println("<html>"); out.println("<body>");

out.println("<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); out.println("<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='57%'>"); out.println("<tr>"); out.println("<td :</b></td>"); out.println("<td rr.getString(2)+"</td>"); out.println("</tr>"); out.println("<tr>"); out.println("<td width='17%'><b>Subject :</b></td>"); out.println("<td width='83%'>"+rr.getString(3)+"</td>"); out.println("</tr>"); out.println("</table>"); out.println("<p><b>Description: </b><p>"); out.println( rr.getString(4)); width='83%'>" + width='17%'><b>From

43

out.println("<p><a action=I'>Back</a>"); out.println("</body>"); out.println("</html>"); }//try catch(Exception e){} finally { try{ rr.close(); st.close(); con.close(); }//try catch(Exception ee){} }//finally }//if dm //to display compose page

href='/project/MailServlet?

if (action.equals("C")) { // show compose html res.sendRedirect("/project/pages/Compose.html"); }// Compose if(action.equals("Compose")) { ResultSet rs=null; try{ String usr = (String) ses.getValue("USR"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String to=req.getParameter("To"); String from=usr; String sub=req.getParameter("Sub"); String desc=req.getParameter("Desc"); Date d= new Date(); SimpleDateFormat smt = new SimpleDateFormat(" E dd/MM/yyyy hh:mm:ss a"); String fmt = smt.format(d); String[] tmp=new String[2]; tmp=to.split("@");

44

String user='"+tmp[0]+"'";

qry1="select

count(*)

from

login

where

rs=st.executeQuery(qry1); rs.next(); String mdate=fmt; int nt=rs.getInt(1); if(nt==0) { out.println("User does not exist"); out.println("<b><a href=/project/pages/Compose.html>Click Here</a></b>"); } else { String qry="insert into box values('"+ to +"','"+from+"@earthmail.com','" +sub +"','"+desc+"','send','"+mdate+"')"; st.executeUpdate(qry); out.println("<h1> Mail Sent Successfully </h1>"); } }//try catch(Exception e2) { e2.printStackTrace(); } finally { r.close(); st.close(); con.close(); rs.close(); } }//if of send composed if(action.equals("A")) { try{ String usr = (String) ses.getValue("USR"); // Connection con = (Connection) // getServletContext().getAttribute("CON"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement();

45

String `User_id`='"+usr+"'";

qry="select

from

`address`

where

int flg=0; r = st.executeQuery(qry); out.println("<html>"); out.println("<head>"); out.println("</head>"); out.println("<body>"); out.println("<form name='frm'method='get'action='/project/MailServlet' >"); out.println("<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber1'>"); out.println("<tr>"); out.println("<td width='20%'><b> Name</td></b>"); out.println("<td width='15%'><b>NickName</td></b>"); out.println("<td width='30%'><b>Email Id</td></b>"); out.println("<td width='35%'><b>Phone No</td></b>"); out.println("</tr>"); while (r.next()) { out.println("<tr>"); out.println("<td width='20%'>" + r.getString(1) + " "+ r.getString(2)+" </td>"); out.println("<td width='15%'>" + r.getString(3) + " </td>"); out.println("<td width='30%'>" + r.getString(4) + " </td>"); out.println("<td width='35%'>" + r.getString(5) + " </td>"); out.println("</tr>"); }// resultset out.println("</table>"); out.println(" <input value='address'>"); out.println(" <input type='submit' name='addn' value='Add Address'>"); out.println(" </a>"); out.println("</form>"); //if(flg==1){ //out.println("input value='add'"); 46

type='hidden'

name='action'

type='hidden'

name='action'

//res.sendRedirect("/project/pages/address_book.htm "); //} out.println("</body>"); out.println("</html>"); } catch (Exception e) { // e.printStackTrace(); } //res.sendRedirect("/project/pages/address_book.htm"); }//if action ===for address book link(to open page only) if(action.equals("address")) { res.sendRedirect("/project/pages/address_book.htm"); } if(action.equals("add")) { try { String usr = (String) ses.getValue("USR"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String fname=req.getParameter("Fname"); String lname=req.getParameter("Lname"); String nname=req.getParameter("Nickname"); String email=req.getParameter("Email"); String phone=req.getParameter("Phone"); =

String qry="insert into address values('"+ +"','"+lname+"','" +nname +"','"+email+"','"+phone+"','"+usr+"')";

fname

st.executeUpdate(qry); res.sendRedirect("/project/MailServlet?action=A"); }catch(Exception e2){e2.printStackTrace();} finally { 47

try{ r.close(); st.close(); con.close(); }catch(Exception e2){e2.printStackTrace();} } }//if action for address book link(to save address) if(action.equals("S")) { out.println("<b>Sent mails</b>"); try{ String usr = (String) ses.getValue("USR"); // Connection con = (Connection) // getServletContext().getAttribute("CON"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String qry="select * from `box` where `Frm`='"+usr+"@earthmail.com'"; r = st.executeQuery(qry); out.println("<html>"); out.println("<body>"); out.println("<table border='2' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber1'>"); out.println("<tr>"); out.println("<td width='2%'><input type='checkbox' name='check'></td>"); out.println("<td width='35%'><b>TO</td></b>"); out.println("<td width='36%'><b>Subject</td></b>"); out.println("<td width='32%'><b>Date/Time</td></b>"); out.println("</tr>"); r.last(); while (true) { out.println("<tr>"); out.println("<td width='3%'><input name='check'></td>"); out.println("<td width='35%'>" + r.getString(1) + " </td>"); type='checkbox'

48

out.println("<td width='35%'><a href='/project/MailServlet? action=SM&id=" + r.getString(1)+"&tt="+r.getString(6) + "'> " + r.getString(3) + "</a></td>"); out.println("<td width='32%'> " + r.getString(6) + "</td>"); out.println("</tr>"); if(r.isFirst()) { break; } r.previous(); }// resultset out.println("</table>"); out.println("</body>"); out.println("</html>"); }//try catch (Exception e) { // e.printStackTrace(); } }//if of sent //settings if(action.equals("ST")){ res.sendRedirect("/project/pages/settings.html"); } if(action.equals("FP")){ String usr,que,ans,qry; usr=req.getParameter("uid"); que=req.getParameter("ques"); ans=req.getParameter("ans"); int c=0; ResultSet rr=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); 49

qry="select count(*) from login where user='"+usr+"' and question='"+que+"' and answer='"+ans+"'"; r=st.executeQuery(qry); r.next(); c=r.getInt(1); if(c!=0){ qry="select * from login where user='"+usr+"'and question='"+que+"' and answer='"+ans+"'"; rr=st.executeQuery(qry); rr.next(); out.println("<h1>Your Password is:"+ rr.getString("pass")+"</h1>"); out.println("<a href='/project/pages/login.html'>OK</a>"); } }catch(Exception e){e.printStackTrace();} finally { r.close(); st.close(); rr.close(); } } if(action.equals("LO")){ ses.removeValue("USR"); res.sendRedirect("/project/pages/login.html"); } if(action.equals("CP")){ String usr = (String)ses.getValue("USR"); String pp1 = req.getParameter("npwd"); String pp = req.getParameter("cpwd"); int c=0; ResultSet rr=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String qry="select count(*) from login where user='"+ usr +"' and pass='"+pp+ "'"; r=st.executeQuery(qry); r.next(); c=r.getInt(1);

50

if(c!=0){ qry="select * from login where user='"+ usr +"' and pass='"+pp+ "'"; rr=st.executeQuery(qry); rr.next(); qry="update login set user='"+rr.getString(1) +"', pass='"+pp1 +"' ,fname='"+rr.getString(3) +"', lname='"+rr.getString(4) +"', address='"+rr.getString(5) +"', city='"+rr.getString(6) +"', gender='"+rr.getString(7) +"', zip_code='"+rr.getString(8) +"', question='"+rr.getString(9) +"', answer='"+rr.getString(10)+"' where user='"+ usr+"'"; st.executeUpdate(qry); out.println("<h1>Password changed Successfully</h1>"); } }catch(Exception e){e.printStackTrace();} finally {r.close(); rr.close(); st.close(); } } if(action.equals("SM")) { String id = req.getParameter("id"); String tt = req.getParameter("tt"); out.println("<b>Sent mails</b>"); ResultSet rr=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:email"); st = con.createStatement(); String qry="select * from box where Too='"+ id +"' and Dt='"+tt+ "'"; rr=st.executeQuery(qry); rr.next(); String from1=rr.getString(1); out.println("<html>"); out.println("<body>");

51

out.println("<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); out.println("<table border='2' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='85%' id='AutoNumber1' height='203'>"); out.println("<tr>"); out.println("<td width='8%' height='19'>To:</td>"); out.println("<td width='92%' height='19'>"+from1+"</td>"); out.println("</tr>"); out.println("<tr>"); out.println("<td height='18'>Subject</td>"); out.println("<td width='92%' height='18'>" +rr.getString(3)+"</td>"); out.println("</tr>"); out.println("<tr>"); out.println("<td align='left' >Description</td>"); out.println("<td width='92%' height='124'>" + rr.getString(4)+"</td>"); out.println("</tr>"); out.println("</table>"); out.println("</body>"); out.println("</html>"); }//try catch(Exception e){} finally { try{ rr.close(); st.close(); 52 width='8%' height='124' width='8%'

con.close(); }//try catch(Exception ee){} }//finally }//if sm }//try catch(Exception e){ e.printStackTrace(); } finally{} }// /service }//class ----------------------------------------------------------------------------------------------------------

DATABASE TABLES:

1. Login Table:
53

Field name fname lname user pass address gender Zip code question answer city

Data type varchar varchar varchar varchar varchar varchar int varchar varchar varchar

Length 15 15 20 20 50 1 6 40 20 20

2 .Mail Table:
Field name To From Desc Flag Date Subject Data type varchar varchar varchar varchar varchar varchar Length 1000 100 10000 10 30 100

54

3. Address Book:

Field Name Fname Lname Nname Email Phno User_id

Data type varchar varchar varchar varchar varchar varchar

Length 20 20 20 50 12 30

55

5 . SNAPSHOTS

1. Login Form:

56

2. New Registration Form:

57

3. Forgot Password Form:

58

59

4. INBOX: 60

5. Compose Section:

61

6. Address Book Details:

62

7. Address Book:

63

8. Change Setting:

64

6. Future Scope

65

To add some chatting facility in this system. To send one mail to many users. As well as Send many mail to one or many users. To give delete mails facility. To incorporate attach files facility at compose time.

7. Project Summary

66

The Mail server is develop to facilitate the user for sending, receiving and compose mails Limited data storage is allocated to each user .It also provide registration of new user. System provide facility if user forget password by using proper process. The GUI of this mail server is very user friendly. User can compose mail by using compose option. User can check received as well as sent mails.User can change password using setting option as well as maintain details of friends in address book.

8. REFERENCES

67

Bibliography:

Head First Servlet & JSP:

Kathy Sierra

Black Book of Java : Steven Holzneretal Complete Reference-Java Java - Balgurusamy

References:
www.sun.com www.google .com

68

69

S-ar putea să vă placă și