anchor.diff:    Result:= Self;
   end;
   
  -function TSendMail.AttachExcelData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'application/x-msexcel', aReferenceName);
  -end;
  -
  -function TSendMail.AttachPDFData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'application/pdf', aReferenceName);
  -end;
  -
  -function TSendMail.AttachTXTData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'text/plain', aReferenceName);
  -end;
  -
  -function TSendMail.AttachXMLData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'text/xml', aReferenceName);
  -end;
  -
  -function TSendMail.AttachZIPData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'application/x-zip-compressed', aReferenceName);
  -end;
  -
  -function TSendMail.AttachWordData(const aData: TStream; const aReferenceName: String): TSendMail;
  -begin
  -  Result:= Self.AttachData(aData, 'application/msword', aReferenceName);
  -end;
  -
  -function TSendMail.AttachData(const aData: TStream; const aMIMEType: String; const aReferenceName: String = ''): TSendMail;
  +function TSendMail.AttachExcelData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/x-msexcel', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachExcelOOXML(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachExcelXLSX(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachPDFData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/pdf', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachTXTData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'text/plain', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachXMLData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'text/xml', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachZIPData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/x-zip-compressed', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachWordData(const aData: TStream; const aFileName: String; const aReferenceName: String): TSendMail;
  +begin
  +  Result:= Self.AttachData(aData, 'application/msword', aFileName, aReferenceName);
  +end;
  +
  +function TSendMail.AttachData(const aData: TStream; const aMIMEType: String; const aFileName: String; const aReferenceName: String = ''): TSendMail;
   var
     tmp : TAttachedFile;
   begin
     tmp := TAttachedFile.Create;
     FAttachments.Add(tmp);
  +  tmp.FileName:= aFileName;
     tmp.FileType:= ftStream;
     tmp.Data:= aData;
     tmp.Reference:= aReferenceName;
  
positive.code:       if f.FileType = ftFile then
          htmlMessageBuilder.Attachments.Add(f.FileName, f.Reference)
        else if f.FileType = ftStream then
          htmlMessageBuilder.Attachments.Add(f.Data, f.MIMEType, f.Reference);
      end;
      htmlMessageBuilder.FillMessage(tmpMessage);
  
  
negative.code:     function AddHTMLPNGImage(const aData : TStream; const aReferenceName: String): TSendMail;
  
      function AttachFile(const aFileName : String; const aReferenceName : String = ''): TSendMail;
      function AttachData(const aData : TStream; const aMIMEType: String; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachExcelData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachExcelOOXML(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachExcelXLSX(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachPDFData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachTXTData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachXMLData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachZIPData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
      function AttachWordData(const aData : TStream; const aFileName: String; const aReferenceName: String = ''): TSendMail;
  
      function AddHTML(const aStrings: TStrings): TSendMail;
      function AddPlainText (const aStrings : TStrings) : TSendMail;
  