multipart/mixed

Giganews Newsgroups
Subject: multipart/mixed
Posted by:  mitring (pfracz…@novatic.pl)
Date: Tue, 15 Jan 2008

How to create multipart/mixed mail in Indy10

  AMsg:= TIdMessage.Create( NIL );
  try
    AMsg.Body.Clear;

//    for I:= 0 to Pred(ATo.Count) do AMsg.Recipients.Add.Address:= ATo.Strings[I];
//    for I:= 0 to Pred(ACC.Count) do AMsg.CCList.Add.Address:= ACC.Strings[I];
//    for I:= 0 to Pred(ABCC.Count)do AMsg.BccList.Add.Address:= ABCC.Strings[I];

    AMsg.Subject:= ASubject;
    AMsg.From.Address:= AFrom;

    AMsg.Recipients.Add.Address:= ATo;
    AMsg.CCList.Add.Address:= ACC;
    AMsg.BccList.Add.Address:= ABCC;

    AMsg.Body.Append( ABody.Text );
    TIdText.

    for I:= 0 to Pred(AAttachList.Count) do
    begin
      TIdAttachmentFile.Create( AMsg.MessageParts, AAttachList.Strings[I] );
    end;

Replies