Problem with outlook 200x and indy 10 mail (delphi 7)

Giganews Newsgroups
Subject: Problem with outlook 200x and indy 10 mail (delphi 7)
Posted by:  ian (i…@ian.com)
Date: Thu, 10 Feb 2005

    slBody := TstringList.Create;
    slBody.Add(Form_Main.LoadFromFile('MailFinal.html'));
    try
      idMessage1.IsEncoded:=true;
      idMessage1.Body.Assign(slBody);
      idMessage1.CharSet := 'iso-8859-1';
      idMessage1.Encoding:=meMIME;
      idMessage1.ContentTransferEncoding := '8bit';
      idMessage1.ContentType := 'multipart/related';
      idMessage1.From.Text:='xxx';
      idMessage1.Recipients.Add.text:=ToSend;
      idMessage1.Subject:='xxx';

      idText1 := TidText.Create(idMessage1.MessageParts);
      idText1.Body:=slBody;
      idText1.ContentType := 'text/html';

      idText2 := TidText.Create(idMessage1.MessageParts);
      idText2.Body.Text := 'Message sans html...';
      idText2.ContentType := 'text/plain';
      idText2.ContentTransfer := '7bit';

      for i1:=0 to slImages.Count-1 do
      begin
        idAttach := TidAttachmentFile.Create(idMessage1.MessageParts,
{VerU(Temp) + }lowercase(slImages.Strings[i1]));
        idAttach.ContentType := 'image/jpeg';
        idAttach.ContentDisposition := 'inline';
        idAttach.ExtraHeaders.Add('Content-ID: <' +
lowercase(slImages.Strings[i1]) + '>');
        idAttach.ExtraHeaders.Values['content-id'] :=
lowercase(slImages.Strings[i1]);
        idAttach.DisplayName := lowercase(slImages.Strings[i1]);
      end;

<and there are the send code...>

Replies