B4J Question Problem using Asyncstreams

wl

Well-Known Member
Licensed User
Longtime User
I implemented a lowlevel SMTP client that seems to work perfectly fine with one SMTP server.
But when connecting to another SMTP server the code blocks. Using a telnet client: no problem in both cases

The protocol is very simple:
- open socket
- Read a line from the SMTP server
- Write a line to the SMTP server ("HELO" & CRLF)
- Read a line: <-- this event _NewText does not come through

Lines are ended by a CRLF. I'm using the AsyncStreamsText, but with textreader and textwriter: same result.

It is driving me nuts !
 

wl

Well-Known Member
Licensed User
Longtime User
Found !

The constant CRLF is not chr(13) & chr(10) but just a chr(10).

It seems one SMTP server does not mind getting a chr(10) at the end of a command, while the other one requires chr(13) & chr(10)
 
Upvote 0
Top