 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Johannes Geyer Guest
|
Posted: Thu Jan 13, 2005 6:41 pm Post subject: SMTP qmail bare LF problem with Indy 9: 10054 Connection res |
|
|
When sending some html emails to a qmail server, I received a socket error
10054 Connection reset by peer. Sometimes the qmail server sent me the
message:
451 See http://pobox.com/~djb/docs/smtplf.html
You can find here that bare LF are not allowed for SMTP.
After some debugging I found out that the problem was in the quotedprintable
encoding (Indy 9.0.18 IdCoderQuotedPrintable line 250):
if Length(Line) > 71 then
begin
NewLine;
end; //if Length(Line > 71 then
When there was a #13 character at Buffer[71] then the new line was inserted
between the #13 and #10 characters. That leaded to #13#13#10#10 which is
prohibited for SMTP. So I fixed it:
if (Length(Line) > 71) and
not(Buffer[i] in [#10,#13]) then // JG 13.01.05
begin
NewLine;
end; //if Length(Line > 71 then
Now it's working fine for me. I don't know if this problem is fixed in Indy
10.
Regards
Johannes Geyer
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|