Bug: TIdMessage Body Empty when sending non-english email

Giganews Newsgroups
Subject: Bug: TIdMessage Body Empty when sending non-english email
Posted by:  henry (chenhon…@yahoo.com)
Date: Thu, 8 Apr 2004

Hi guys,
When I use TIdSMTPServer to send out an email, I set
ReceiveMode:=rmMessageParsed
Following is the event handler:

procedure TForm1.IdSMTPServer1ReceiveMessageParsed(ASender: TIdCommand;
  var AMsg: TIdMessage; RCPT: TIdEMailAddressList;  var CustomError:
String);
var i:integer;
begin
    showmessage(AMsg.body.text);
    for i:=0 to Pred(AMsg.MessageParts.Count) do
          if AMsg.MessageParts.Items[i] is TIdText then
          begin
              ShowMessage(TIdText(AMsg.MessageParts.Items[i]).Body.Text);
              break;
          end;
end

Now,
1)    If I send out an email with English-only-text-body, then the mail text
body is displayed PROPERLY by first showmessage statement.
2)    If I send out an email with non-English-text-body plus an attachment,
then the mail text body is displayed PROPERLY by the second showmessage
statement
3)    If I send out an email with non-English-text-body, and WITHOUT an
attachment, then both showmessage statement will display EMPTY string.

I have tried both 9.0.14 and develop snap (as of April 7,2004), the problem
exist in both version.
I think this is a bug.

Replies