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
CharTerminatedInputStream(in,SMTPTerminator);
msgIn = new SizeLimitedInputStream(msgIn,
smtpProtocol.getPropertyLong(MAX_MSG_SIZE));
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];
msgIn.read(b);
System.out.println(new String(b));
// just for debugging
} catch (Exception e) {
e.printStackTrace();
}
debugPrintHeaders(ih);
}
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.
-Andy
--
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI
http://jakarta.apache.org/poi
For Java and Excel, Got POI?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]