Java
  Home arrow Java arrow Page 3 - Java Mail API: Transforming Mail into Data...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Java Mail API: Transforming Mail into Data Carriers
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2005-11-22

    Table of Contents:
  • Java Mail API: Transforming Mail into Data Carriers
  • Java Mail Core Classes Continued
  • Mails As Data Carriers: A Practical Approach
  • Sending
  • Receiving

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Java Mail API: Transforming Mail into Data Carriers - Mails As Data Carriers: A Practical Approach


    (Page 3 of 5 )

    When data transfer is the issue (in the context of J2EE), there are three possible approaches:

    1. Use Message Driven Beans or JMS.
    2. Use XML over HTTP.
    3. Generate a document in a predefined format (XML/SGML) and send it through mailing.

    Usually the first two approaches have been followed until now. The third approach was in a way scoffed at because third party mailing APIs had to be used. But with the advent of the Java Mail API, the third approach is becoming more viable due to the following reasons:

    • The MDB or JMS needs a full fledged application server, which means a higher requirement for system resources.

    • The communication, in the case of MDB, takes place in binary format (unless it is specifically programmed to use base 64). That brings firewalls into the picture.

    • The XML over HTTP approach requires a separate server (e.g.: SOAP server) to perform the required processing, which again means a high end system is required.

    Now that the problems with the first two approaches have been clarified, let's see how Java Mail helps in overcoming them. The approach with Java Mail is simple. First, generate the XML document from the data. Second, transfer the data using Java Mail to the required host. Finally, extract the data from the XML attachment and extract the data from the XML document.

    In this way, no matter the size of the data, it can be transferred. Here the Mail API doesn’t put any restriction on the size of the attachment. The restriction, if any, comes from the limitations enforced by the Mail server, and that is configurable.

    More Java Articles
    More By A.P.Rajshekhar


       · HiThank you for reading this article. It details about using Mail API as data...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT