SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
J2ME IMPLEMENTATION
         OF POP3 CLIENT
What is POP3 Mail
Short for Post Office Protocol, a protocol used to retrieve e-mail from a mail server.
Most e-mail applications (sometimes called an e-mail client) use the POP protocol,
although some can use the newer IMAP (Internet Message Access Protocol).
In computing, local e-mail clients use the Post Office Protocol version 3 (POP3),
an application-layer Internet standard protocol, to retrieve e-mail from a remote
server over a TCP/IP connection.
 Nearly all subscribers to individual Internet service provider e-mail accounts
access their e-mail with client software that uses POP3
There are two versions of POP. The first, called POP2, became a standard in the
mid-80's and requires SMTP to send messages. The newer version, POP3, can be
used with or without SMTP.


Problem Definition
•   In the global Internet, Electronic Mail is a widely used communication medium
    for different hosts located at various different geographical locations.
•   In Wired Networks the E-mail can be downloaded and viewed through various
    POP3 Clients like Outlook Express or Web browsers (I.E., Netscape) using
    computers/ laptops connected to this Network.
•   These days due to the technological advancement in Embedded and
    Networking Technologies introduced various variety of portable handheld
    devices for the purpose of communication in Wireless Network (even for global
    Internet).
•   Electronic Mail can also be accessed with the devices such as smart mobile
    phones, PDAs which can be owned by the consumers with less cost over
    computers or laptops which are currently in use.
•   The existing solutions for accessing E-Mails through these devices in GSM/
    Wireless Networks are WAP and SMS based.


Disadvantages of WAP based Solutions for E-Mail Access
• Data transfer b/w Mobiles and POP3 Servers includes data transfer for Markup
   Language and Application Data
•   This requires high air time
•   Cost will also be high
•   Network traffic will be significantly increased
•   Always requires interaction with the pop3 server
•   Certain Graphical/ Animation features are disabled.
PROPOSED SOLUTION
•     Sun Micro Systems has introduced the latest addition to the Java Platform:
      Java 2 Micro Edition for providing solutions to these hand held devices
      (Mobiles, PDAs).
•     The newly proposed solution is primarily a POP3 E-Mail Client based on J2ME
      for the hand held devices such as smart mobile phones, PDAs.

ADVANTAGES
      Servlet code for reading Email from J2ME phone is provided. This makes this
      project to be accessed by any java enabled mobile device to connect to any
      web server to check the mails.
      MIME versions are supported, means a rich contents are supported.
      In the J2ME version, because of restrictions on format's for which the phone
      supports, attachments are not supported. So provision is made in such a way
      that if there is a attachment included in the mail, then the receivers would be
      informed about the attachment file name along with other details of the mail.
      Any text in the the mail leaving the attachments would be converted into Text
      format and are supported on the J2ME phone.
      In order to avoid Net Congestion, for the J2ME mail, only the beginning 1500
      characters of the mail are sent to the receiver. This feature has been
      implemented for the security reasons.
      Mail's sent to POP3 Email addresses for all registered users will be downloaded
      to the internal mail storage server at a pre determined time. So by the time user
      tries to login from J2ME phone, all the mails will be readily available.
      This improves performance, since at the run time it's not required to connect to
      other POP3 server's to retrieve Email. All the e-mail's are readily available for
      user retrieval from phone. Still if the user wants to force a update from other
      POP3 server's then "Update Now" feature can be provided in the software.


H/W & S/W REQUIREMENTS
Monitors      :   800 x 600 minimum resolution at 256 colors minimum
Memory        :   Approximately 256 MB of on board memory.
I/O           :   Mouse and standard 101-key keyboard.
Mhz           :   At least 700 MHz processor
OS            :   Win 98 , NT, XP,2000
Java          :   JDK 1.4 or Above
Tools         :   J2ME Wireless Tool Kit 2.1, NetBeans 3.6 or above, Mail Server

J2ME Wireless Toolkit
The J2ME Wireless Toolkit version 2.1 supports development of applications
compliant with the Java Technology for the Wireless Industry, Java Specification
Request (JSR-185). The J2ME Wireless Toolkit version 2.1 also includes support
for J2ME Web Services (JSR-172).
The KToolbar, included with the J2ME Wireless Toolkit, is a minimal development
environment with a Graphical User Interface (GUI) for compiling, packaging, and
executing MIDP applications. The only other tools you need are a third-party editor
for your Java source files and a debugger.
An IDE compatible with the J2ME Wireless Toolkit, such as the Sun™ Open Net
Environment (Sun ONE) Studio IDE, provides even more convenience. For
example, when you use the Wireless Toolkit within an IDE, you can edit, compile,
package, and execute or debug MIDP applications, all within the same
environment.
For a list of IDEs that are compatible with the Wireless Toolkit, see the Java™ 2
Platform,      Micro     Edition,    Wireless     Toolkit    web       page    at
http://java.sun.com/products/j2mewtoolkit/. When working with the J2ME Wireless
Toolkit in standalone mode, you work mainly through the KToolbar.
Mobile Mail package is an e-mail client-server solution for mobile devices based on
Java/J2ME-MIDP technology. The implementation enables a Java mobile that
support only HTTP protocol to have e-mail capabilities via MailGateway.
It contains a client application (midlet) designed to run on mobile and a server side
software (servlet) that runs on service provider's network and acts as a
MailGateway.
Based on this model, Mobile Mail have to be implemented as an e-mail service
where the provider installs the MailGateway and then start to delivery the client
application for Java mobiles to his end users.
The client (midlet) implements all minimal capabilities for an e-mail client software
in order to work on mobile devices. The viewing messages (e-mails) are core
facilities.
The server application, is also designed under Java and it is based on servlet
technology. It handles the requests from the e-mail mobile client over HTTP and
deals with the real e-mail servers (POP3) in order to satisfy the mobile request
(receiving messages/e-mails).
Most of Java mobile devices on marketplace support only HTTP protocol over
WAP and as result, with the Mobile Mail package the providers could extend their
services and increase the revenues through distribution of the client application to
end-users.


                                  OPERATION
0ffline Process:
   One of the most important features we use in the POP3 Email application is the
   Mail ID feature.
   The RFC for POP3 mail storage mechanism provides details about the UIDL
   Command which provided a unique ID for each POP3 Email.
   The other way of implementing this feature would be, after reteiving the mail
   before storing this mail into the local POP3 store, assign a unique ID number
   for each mail. This can be based on the User Login ID and Time parameters.
At run time based on the POP3 server name , UID and Password details
  provided by the user (during registration), this process downloads all the
  Emails. All the mails are stored in the local mail storage folder allocated for this
  particular user.
  The other place where mail details are stored are is in the Hashtable and a
  vector. The Vector has list of all Mail UID's sorted in the order in which mails
  were received. The Hashtable has list of Message Subjects with Message UID
  as the Key.
  So when user first log's in starting list of Messages UID's are retrieved from
  vector and the corresponding list of Messages Subjects are retrieved from
  hashtable. Since the java classes implements Serializable interface.
  So after the data is updated i this files is stored in the Serialized format in the
  user's local mails folder.
  Continue the same process for all registered users at the specified intervals
  and download all the mails and store them in the local store.


Online Process:
  This process is implemented by a Servlet and takes place when user tries to
  access mail from J2ME phone.
  User on J2Me phone is kept completely transparent about the process that
  takes place for Email retrieval.
  First step would be for user to login into the mail System. So user would be
  shown from J2Me phone a login screen where user has to enter
  USERNAME/PASSWORD and hit submit.
  The request comes back to the Servlet which validates this particular user's
  identity.
  If the USERNAME/PASSWORD combination provided from J2ME phone are
  valid then user successfully login's and in the response a unique Mailbox
  number assigned for this particular user will be returned.
  Until the user log's out from application this will be key which will be used for all
  further mail related transactions.
  Next when user tries to retrieve the mail's list, then a request is made to the
  Servlet.
  When Servlet receives this request, then based on the UID, the corresponding
  Serialized MailLister file is retrieved from user's folder and the list of subjects
  and the Message Id are sent back in the response.
  On the J2ME phone end, when it receives back the response, then list of
  Message Subjects are shown in the list.
  A separate string array has list of Message UID's for each of these messages.
  So when user selects a particular message from the list, then the corresponding
  Message number is read from the String array and the request is made to
  Servlet to retrieve subject for the mail with that particular Message ID.
References
SUN Java 2 Platform, Standard Edition, v 1.4.0 API Specification
SUN Java 2 Platform, Standard Edition, v 1.4.0 Tutorial


                                 MODULES
Inputs: ----- aaa (32)
. which inputs;
. in what form/ format will inputs arrive;
. from what sources input will be derived, legal domains of each input
element


Processing: ------ bbb (09)
. describes the outcome rather than the implementation;
. include any validity checks on the data, exact timing of each operation
(if needed), how to handle unexpected or abnormal situations


Outputs: -------- ccc (11)
. the form,
. shape,
. destination,
. and volume of the output;
. output timing;
. range of parameters in the output;
. unit measure of the output;
. process by which the output is stored or destroyed;
. process for handling error messages produced as output

Mais conteúdo relacionado

Mais de ncct

Digital Water Marking For Video Piracy Detection
Digital Water Marking For Video Piracy DetectionDigital Water Marking For Video Piracy Detection
Digital Water Marking For Video Piracy Detection
ncct
 
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
ncct
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
ncct
 
Rail Track Inspector
Rail Track InspectorRail Track Inspector
Rail Track Inspector
ncct
 
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
Botminer   Clustering Analysis Of Network Traffic For Protocol  And Structure...Botminer   Clustering Analysis Of Network Traffic For Protocol  And Structure...
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
ncct
 
Bot Robo Tanker Sound Detector
Bot Robo  Tanker  Sound DetectorBot Robo  Tanker  Sound Detector
Bot Robo Tanker Sound Detector
ncct
 
Distance Protection
Distance ProtectionDistance Protection
Distance Protection
ncct
 
Bluetooth Jammer
Bluetooth  JammerBluetooth  Jammer
Bluetooth Jammer
ncct
 
Crypkit 1
Crypkit 1Crypkit 1
Crypkit 1
ncct
 
B E Projects M C A Projects B
B E  Projects  M C A  Projects  BB E  Projects  M C A  Projects  B
B E Projects M C A Projects B
ncct
 
J2 E E Projects, I E E E Projects 2009
J2 E E  Projects,  I E E E  Projects 2009J2 E E  Projects,  I E E E  Projects 2009
J2 E E Projects, I E E E Projects 2009
ncct
 
J2 M E Projects, I E E E Projects 2009
J2 M E  Projects,  I E E E  Projects 2009J2 M E  Projects,  I E E E  Projects 2009
J2 M E Projects, I E E E Projects 2009
ncct
 
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
Engineering  College  Projects,  M C A  Projects,  B E  Projects,  B Tech  Pr...Engineering  College  Projects,  M C A  Projects,  B E  Projects,  B Tech  Pr...
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
ncct
 
B E M E Projects M C A Projects B
B E  M E  Projects  M C A  Projects  BB E  M E  Projects  M C A  Projects  B
B E M E Projects M C A Projects B
ncct
 
I E E E 2009 Java Projects, I E E E 2009 A S P
I E E E 2009  Java  Projects,  I E E E 2009  A S PI E E E 2009  Java  Projects,  I E E E 2009  A S P
I E E E 2009 Java Projects, I E E E 2009 A S P
ncct
 
Advantages Of Software Projects N C C T
Advantages Of  Software  Projects  N C C TAdvantages Of  Software  Projects  N C C T
Advantages Of Software Projects N C C T
ncct
 
Engineering Projects
Engineering  ProjectsEngineering  Projects
Engineering Projects
ncct
 
Software Projects Java Projects Mobile Computing
Software  Projects  Java  Projects  Mobile  ComputingSoftware  Projects  Java  Projects  Mobile  Computing
Software Projects Java Projects Mobile Computing
ncct
 
Final Year Engineering Projects
Final  Year  Engineering  ProjectsFinal  Year  Engineering  Projects
Final Year Engineering Projects
ncct
 
A S P
A S PA S P
A S P
ncct
 

Mais de ncct (20)

Digital Water Marking For Video Piracy Detection
Digital Water Marking For Video Piracy DetectionDigital Water Marking For Video Piracy Detection
Digital Water Marking For Video Piracy Detection
 
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
 
Rail Track Inspector
Rail Track InspectorRail Track Inspector
Rail Track Inspector
 
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
Botminer   Clustering Analysis Of Network Traffic For Protocol  And Structure...Botminer   Clustering Analysis Of Network Traffic For Protocol  And Structure...
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
 
Bot Robo Tanker Sound Detector
Bot Robo  Tanker  Sound DetectorBot Robo  Tanker  Sound Detector
Bot Robo Tanker Sound Detector
 
Distance Protection
Distance ProtectionDistance Protection
Distance Protection
 
Bluetooth Jammer
Bluetooth  JammerBluetooth  Jammer
Bluetooth Jammer
 
Crypkit 1
Crypkit 1Crypkit 1
Crypkit 1
 
B E Projects M C A Projects B
B E  Projects  M C A  Projects  BB E  Projects  M C A  Projects  B
B E Projects M C A Projects B
 
J2 E E Projects, I E E E Projects 2009
J2 E E  Projects,  I E E E  Projects 2009J2 E E  Projects,  I E E E  Projects 2009
J2 E E Projects, I E E E Projects 2009
 
J2 M E Projects, I E E E Projects 2009
J2 M E  Projects,  I E E E  Projects 2009J2 M E  Projects,  I E E E  Projects 2009
J2 M E Projects, I E E E Projects 2009
 
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
Engineering  College  Projects,  M C A  Projects,  B E  Projects,  B Tech  Pr...Engineering  College  Projects,  M C A  Projects,  B E  Projects,  B Tech  Pr...
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
 
B E M E Projects M C A Projects B
B E  M E  Projects  M C A  Projects  BB E  M E  Projects  M C A  Projects  B
B E M E Projects M C A Projects B
 
I E E E 2009 Java Projects, I E E E 2009 A S P
I E E E 2009  Java  Projects,  I E E E 2009  A S PI E E E 2009  Java  Projects,  I E E E 2009  A S P
I E E E 2009 Java Projects, I E E E 2009 A S P
 
Advantages Of Software Projects N C C T
Advantages Of  Software  Projects  N C C TAdvantages Of  Software  Projects  N C C T
Advantages Of Software Projects N C C T
 
Engineering Projects
Engineering  ProjectsEngineering  Projects
Engineering Projects
 
Software Projects Java Projects Mobile Computing
Software  Projects  Java  Projects  Mobile  ComputingSoftware  Projects  Java  Projects  Mobile  Computing
Software Projects Java Projects Mobile Computing
 
Final Year Engineering Projects
Final  Year  Engineering  ProjectsFinal  Year  Engineering  Projects
Final Year Engineering Projects
 
A S P
A S PA S P
A S P
 

Java Abs J2 Me Implementation Of Pop3 Client

  • 1. J2ME IMPLEMENTATION OF POP3 CLIENT What is POP3 Mail Short for Post Office Protocol, a protocol used to retrieve e-mail from a mail server. Most e-mail applications (sometimes called an e-mail client) use the POP protocol, although some can use the newer IMAP (Internet Message Access Protocol). In computing, local e-mail clients use the Post Office Protocol version 3 (POP3), an application-layer Internet standard protocol, to retrieve e-mail from a remote server over a TCP/IP connection. Nearly all subscribers to individual Internet service provider e-mail accounts access their e-mail with client software that uses POP3 There are two versions of POP. The first, called POP2, became a standard in the mid-80's and requires SMTP to send messages. The newer version, POP3, can be used with or without SMTP. Problem Definition • In the global Internet, Electronic Mail is a widely used communication medium for different hosts located at various different geographical locations. • In Wired Networks the E-mail can be downloaded and viewed through various POP3 Clients like Outlook Express or Web browsers (I.E., Netscape) using computers/ laptops connected to this Network. • These days due to the technological advancement in Embedded and Networking Technologies introduced various variety of portable handheld devices for the purpose of communication in Wireless Network (even for global Internet). • Electronic Mail can also be accessed with the devices such as smart mobile phones, PDAs which can be owned by the consumers with less cost over computers or laptops which are currently in use. • The existing solutions for accessing E-Mails through these devices in GSM/ Wireless Networks are WAP and SMS based. Disadvantages of WAP based Solutions for E-Mail Access • Data transfer b/w Mobiles and POP3 Servers includes data transfer for Markup Language and Application Data • This requires high air time • Cost will also be high • Network traffic will be significantly increased • Always requires interaction with the pop3 server • Certain Graphical/ Animation features are disabled.
  • 2. PROPOSED SOLUTION • Sun Micro Systems has introduced the latest addition to the Java Platform: Java 2 Micro Edition for providing solutions to these hand held devices (Mobiles, PDAs). • The newly proposed solution is primarily a POP3 E-Mail Client based on J2ME for the hand held devices such as smart mobile phones, PDAs. ADVANTAGES Servlet code for reading Email from J2ME phone is provided. This makes this project to be accessed by any java enabled mobile device to connect to any web server to check the mails. MIME versions are supported, means a rich contents are supported. In the J2ME version, because of restrictions on format's for which the phone supports, attachments are not supported. So provision is made in such a way that if there is a attachment included in the mail, then the receivers would be informed about the attachment file name along with other details of the mail. Any text in the the mail leaving the attachments would be converted into Text format and are supported on the J2ME phone. In order to avoid Net Congestion, for the J2ME mail, only the beginning 1500 characters of the mail are sent to the receiver. This feature has been implemented for the security reasons. Mail's sent to POP3 Email addresses for all registered users will be downloaded to the internal mail storage server at a pre determined time. So by the time user tries to login from J2ME phone, all the mails will be readily available. This improves performance, since at the run time it's not required to connect to other POP3 server's to retrieve Email. All the e-mail's are readily available for user retrieval from phone. Still if the user wants to force a update from other POP3 server's then "Update Now" feature can be provided in the software. H/W & S/W REQUIREMENTS Monitors : 800 x 600 minimum resolution at 256 colors minimum Memory : Approximately 256 MB of on board memory. I/O : Mouse and standard 101-key keyboard. Mhz : At least 700 MHz processor OS : Win 98 , NT, XP,2000 Java : JDK 1.4 or Above Tools : J2ME Wireless Tool Kit 2.1, NetBeans 3.6 or above, Mail Server J2ME Wireless Toolkit The J2ME Wireless Toolkit version 2.1 supports development of applications compliant with the Java Technology for the Wireless Industry, Java Specification Request (JSR-185). The J2ME Wireless Toolkit version 2.1 also includes support for J2ME Web Services (JSR-172).
  • 3. The KToolbar, included with the J2ME Wireless Toolkit, is a minimal development environment with a Graphical User Interface (GUI) for compiling, packaging, and executing MIDP applications. The only other tools you need are a third-party editor for your Java source files and a debugger. An IDE compatible with the J2ME Wireless Toolkit, such as the Sun™ Open Net Environment (Sun ONE) Studio IDE, provides even more convenience. For example, when you use the Wireless Toolkit within an IDE, you can edit, compile, package, and execute or debug MIDP applications, all within the same environment. For a list of IDEs that are compatible with the Wireless Toolkit, see the Java™ 2 Platform, Micro Edition, Wireless Toolkit web page at http://java.sun.com/products/j2mewtoolkit/. When working with the J2ME Wireless Toolkit in standalone mode, you work mainly through the KToolbar. Mobile Mail package is an e-mail client-server solution for mobile devices based on Java/J2ME-MIDP technology. The implementation enables a Java mobile that support only HTTP protocol to have e-mail capabilities via MailGateway. It contains a client application (midlet) designed to run on mobile and a server side software (servlet) that runs on service provider's network and acts as a MailGateway. Based on this model, Mobile Mail have to be implemented as an e-mail service where the provider installs the MailGateway and then start to delivery the client application for Java mobiles to his end users. The client (midlet) implements all minimal capabilities for an e-mail client software in order to work on mobile devices. The viewing messages (e-mails) are core facilities. The server application, is also designed under Java and it is based on servlet technology. It handles the requests from the e-mail mobile client over HTTP and deals with the real e-mail servers (POP3) in order to satisfy the mobile request (receiving messages/e-mails). Most of Java mobile devices on marketplace support only HTTP protocol over WAP and as result, with the Mobile Mail package the providers could extend their services and increase the revenues through distribution of the client application to end-users. OPERATION 0ffline Process: One of the most important features we use in the POP3 Email application is the Mail ID feature. The RFC for POP3 mail storage mechanism provides details about the UIDL Command which provided a unique ID for each POP3 Email. The other way of implementing this feature would be, after reteiving the mail before storing this mail into the local POP3 store, assign a unique ID number for each mail. This can be based on the User Login ID and Time parameters.
  • 4. At run time based on the POP3 server name , UID and Password details provided by the user (during registration), this process downloads all the Emails. All the mails are stored in the local mail storage folder allocated for this particular user. The other place where mail details are stored are is in the Hashtable and a vector. The Vector has list of all Mail UID's sorted in the order in which mails were received. The Hashtable has list of Message Subjects with Message UID as the Key. So when user first log's in starting list of Messages UID's are retrieved from vector and the corresponding list of Messages Subjects are retrieved from hashtable. Since the java classes implements Serializable interface. So after the data is updated i this files is stored in the Serialized format in the user's local mails folder. Continue the same process for all registered users at the specified intervals and download all the mails and store them in the local store. Online Process: This process is implemented by a Servlet and takes place when user tries to access mail from J2ME phone. User on J2Me phone is kept completely transparent about the process that takes place for Email retrieval. First step would be for user to login into the mail System. So user would be shown from J2Me phone a login screen where user has to enter USERNAME/PASSWORD and hit submit. The request comes back to the Servlet which validates this particular user's identity. If the USERNAME/PASSWORD combination provided from J2ME phone are valid then user successfully login's and in the response a unique Mailbox number assigned for this particular user will be returned. Until the user log's out from application this will be key which will be used for all further mail related transactions. Next when user tries to retrieve the mail's list, then a request is made to the Servlet. When Servlet receives this request, then based on the UID, the corresponding Serialized MailLister file is retrieved from user's folder and the list of subjects and the Message Id are sent back in the response. On the J2ME phone end, when it receives back the response, then list of Message Subjects are shown in the list. A separate string array has list of Message UID's for each of these messages. So when user selects a particular message from the list, then the corresponding Message number is read from the String array and the request is made to Servlet to retrieve subject for the mail with that particular Message ID.
  • 5. References SUN Java 2 Platform, Standard Edition, v 1.4.0 API Specification SUN Java 2 Platform, Standard Edition, v 1.4.0 Tutorial MODULES Inputs: ----- aaa (32) . which inputs; . in what form/ format will inputs arrive; . from what sources input will be derived, legal domains of each input element Processing: ------ bbb (09) . describes the outcome rather than the implementation; . include any validity checks on the data, exact timing of each operation (if needed), how to handle unexpected or abnormal situations Outputs: -------- ccc (11) . the form, . shape, . destination, . and volume of the output; . output timing; . range of parameters in the output; . unit measure of the output; . process by which the output is stored or destroyed; . process for handling error messages produced as output