//*********************************************************************
//*             PROGRAM - OnBeforeSavingMessage 2020-10-10            *
//*                        >> Ereignisscript <<                       *
//*                                                                   *
//* Funktionalitaet: [x] neutral                                      *
//*                  [ ] nur Basis_Modul                              *
//*                  [ ] nur Pathfinder                               *
//*                                                                   *
//* Datum     : ueberarbeitet am: 10.10.2020                          *
//* Autor     : Thomas Barghahn                                       *
//*                                                                   *
//*********************************************************************

program OnBeforeSavingMessage;

uses TextFile;

 {$I Dialog_Functions.ds}
 {$I _i_OBSaveM_Quote_Correction.ds}
 {$I _i_OBSaveM_DelTOFU_and_BodyScoring.ds}    
 {$I _i_OBSaveM_PostShow.ds}
 {$I _i_OBSaveM_EditHTML.ds}
 {$I _i_OBSaveM_Set_Lines_Header.ds}

procedure OnBeforeSavingMessage(var    Message    : TStringlist; 
                                const  Servername : string;
                                const  IsEmail    : boolean);

var Not_Error : Boolean;
var Error_Func : String;

begin  

   Not_Error := True;
   Error_Func := '';
   
   If Message.Count = 0 then Exit;
   Not_Error := Quote_Correction ( Not_Error, Message, IsEmail, Error_Func );
   Not_Error := DelTofu_and_BodyScoring ( Not_Error, Message, IsEmail, Error_Func );
   Not_Error := PostShow_OBSaving ( Not_Error, Message, IsEmail, Error_Func );
   Not_Error := EditHTML (Not_Error, Message, IsEmail, Error_Func );
   Not_Error := Set_Lines_Header ( Not_Error, Message, IsEmail, Error_Func );
end;

begin
end.