Problem with smtp on Indy10

Giganews Newsgroups
Subject: Problem with smtp on Indy10
Posted by:  Hershcu S (sori…@zahav.net.il)
Date: Wed, 29 Apr 2009

Hello

I want to raise again the thread from embarcadero..thirdpartytools.general

I use this method for setting properties to IdMessage

procedure TSendMail.SetMessageVal(FromName, FromAddr, To, AttacheFile:
String; Body: TStrings);
begin
  FMessage.From.Address := FromAddr;
  FMessage.From.Name := FromName;
  FMessage.Recipients.EMailAddresses := To;
  FMessage.Body := Body;
  if FileExists(AttacheFile) then
    TIdAttachmentFile.Create(FMessage.MessageParts,  AttacheFile);
  FMessage.CharSet := 'IBM862';    // this line for hebrew letters
end;

If I call this method when AttacheFile = ''
the received email body is correct.
If I call this method when AttacheFile = 'C:\Temp\Test.txt'
the received email body are only questions marks.

I post the Test.txt file on Embarcadero.public.attachments.

What I'm missing?

Thanks Sorin

Replies