Problem with SMTPServer and HTML-Mails

Giganews Newsgroups
Subject: Problem with SMTPServer and HTML-Mails
Posted by:  Master Surfer (mastersurfer…
Date: Fri, 05 Sep 2008


I have a great problem!

I use the current Indy DevSnapshot. I have a IdSmtpServer in my project,
on message arrival i proccess it with this code:

if MsgObj.MessageParts.Count > 0 then begin
  for i := 0 to MsgObj.MessageParts.Count - 1 do begin
    if MsgObj.MessageParts.Items[i] is TidText then begin
      if (LowerCase(MsgObj.MessageParts.Items[i].ContentType) =
'text/plain') then begin
        //save the plaintext from:
      end else if (LowerCase(MsgObj.MessageParts.Items[i].ContentType)
= 'text/html') then begin
        //save the htmltext and convert it!
// ***********
// PROBLEM!!!!
// ***********
        end else if MsgObj.MessageParts.Items[i] is TIdAttachmentFile
then begin

// and so on....

if the html-text contains a CRLF + "." + CRLF the html content is cut at
this position, but the mail is accepted correctly.
this string is normally the signal for a mailserver that the transfer is
completed by the client.

for example the mail-stream looks like that:
freien Internetzugang </u>durch fremde Personen in Ihren Einrichtungen (z.B=
Schulen, Kinderg=C3=A4rten und andere kommunale Einrichtungen). Sie als Bet=

after the "z.B" I don't get more html-source with the code.

So what is the problem in my code or is it a bug? What can I do?

Thanks for a answer.