james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@apache.org>
Subject Understanding the SMTPHandler Data method
Date Fri, 06 Jun 2003 00:02:28 GMT
Hi all,

First of all, I'll be up front, I'm doing a different SMTP server.  Its kind
of a fork because I have totally different objectives from JAMES.

However, I'd like to work within the JAMES community.  In the work I'm doing
I'm gaining insight and places where I refactor thing, it may make sense to
just share the love in both places.  Anyhow I don't want to argue these
points or my motives or whatever, just be up front.

So I'm trying to understand how SMTPHandler: doData works.  I've tried to do
a little refactoring (I realize I have more to do):

InputStream in = request.getInputStream();
        InputStream msgIn = new
        msgIn = new SizeLimitedInputStream(msgIn,
        msgIn = new DotStuffingInputStream(msgIn);
        Mail mail = Mail.create(msgIn);
  public Mail(InputStream msgIn) {
       System.out.println("MAIL constructor called");
       try {
       ih = new InternetHeaders(msgIn);
// just for debugging
       byte[] b = new byte[4];

      System.out.println(new String(b));
// just for debugging
       } catch (Exception e) {


   public static Mail create(InputStream msgIn) {
    System.out.println("Mail CREATE called");
     Mail mail = new Mail(msgIn);
     return mail;

Oddly, this just blocks when mozilla mail tries.  When I go at it with
telnet it returns on the first enter.

So I guess my curiosity is how does the doDATA and its collaborating streams
work?  What am I missing from this picture?

Thanks for any help you can provide.


Andrew C. Oliver
Custom enhancements and Commercial Implementation for Jakarta POI

For Java and Excel, Got POI?

To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org

View raw message