anchor.diff:        ff := 'undefined';
       GetAttachment(i).FileData.SaveToFile(CheckExistingFile(IncludeTrailingPathDelimiter(aFolder) + ff));
     end;
  +end;
  +
  +function TReceivedMail.GetHTMLReport: String;
  +var
  +  i, p, le : integer;
  +  toAdd, allLower : String;
  +begin
  +  Result := '';
  +
  +  if FHTMLBody.Count > 0 then
  +  begin
  +    toAdd := FHTMLBody.Text;
  +    allLower := LowerCase(toAdd);
  +    p := Pos('<body', allLower);
  +    if p > 0 then
  +    begin
  +      Result := Copy(toAdd, 1, p);
  +      toAdd := Copy(toAdd, p + 1, MaxInt);
  +      p := 1;
  +      le := Length(toAdd);
  +      while (p <= le) and (toAdd[p] <> '>') do
  +        inc(p);
  +      Result := Result + Copy(toAdd, 1, p);
  +      toAdd := Copy(toAdd, p + 1, MaxInt);
  +    end;
  +    Result := Result + GetHTMLReportHeader + toAdd;
  +  end
  +  else
  +  begin
  +    Result := '<html><body>' + GetHTMLReportHeader + '<span>';
  +    for i := 0 to FBody.Count - 1 do
  +      Result := Result + FBody.Strings[i] + '<br>';
  +    Result := Result + '</span></body></html>';
  +  end;
  +  logger.Debug('GetHTMLReport:' + Result);
  +end;
  +
  +function TReceivedMail.GetTXTReport: String;
  +begin
  +  Result := GetTXTReportHeader + FBody.Text;
   end;
   
   { TReceivedMailAttachment }
  
positive.code: uses
    sysutils,
    IdPOP3,
    IdMessage, IdMessageBuilder, IdAttachment, IdText,
    IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase,
    IdMessageClient, IdSMTPBase, IdBaseComponent, IdIOHandler,
    IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL, IdSASLLogin,
    IdSASL_CRAM_SHA1, IdSASL, IdSASLUserPass, IdSASL_CRAMBase, IdSASL_CRAM_MD5,
    IdSASLSKey, IdSASLPlain, IdSASLOTP, IdSASLExternal, IdSASLDigest,
    IdSASLAnonymous, IdUserPassProvider,
    mUtility{$IFDEF MLOG_AVAILABLE}, mLog{$ENDIF};
  
  
negative.code:     function AttachmentsCount: integer;
      function AddAttachment : TReceivedMailAttachment;
      procedure SaveToFolder (const aFolder : String);
      function GetHTMLReport : String;
      function GetTXTReport : String;
  
      property Subject : String read FSubject write FSubject;
      property Recipients : TStringList read FRecipients;
  