//---------------------------------------------------------------------------

#ifndef telegramH
#define telegramH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <NMsmtp.hpp>
#include <Psock.hpp>
#include <ComCtrls.hpp>
#include <dos.h>
#include <dir.h>
#include "..\\main\\main.h"
#include "..\\monitoring\\monitoring.h"
#include "..\\obrion\\obrion.h"
//---------------------------------------------------------------------------
class TTelegr : public TForm
{
__published:	// IDE-managed Components
        TPanel *Panel1;
        TEdit *Edit2;
        TEdit *Edit3;
        TEdit *Edit4;
        TEdit *Edit5;
        TEdit *Edit1;
        TEdit *Edit6;
        TLabel *Label1;
        TEdit *Edit7;
        TEdit *Edit8;
        TEdit *Edit9;
        TEdit *Edit10;
        TEdit *Edit11;
        TEdit *Edit12;
        TEdit *Edit13;
        TNMSMTP *NMSMTP1;
        TStatusBar *StatusBar1;
        TButton *Button1;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall NMSMTP1Success(TObject *Sender);
        void __fastcall NMSMTP1Connect(TObject *Sender);
        void __fastcall NMSMTP1ConnectionFailed(TObject *Sender);
        void __fastcall NMSMTP1Disconnect(TObject *Sender);
        void __fastcall NMSMTP1Failure(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall NMSMTP1SendStart(TObject *Sender);
        void __fastcall NMSMTP1ConnectionRequired(bool &Handled);
private:	// User declarations
public:		// User declarations
        AnsiString TextTel1, TextTel2, Adr, Adres1[10], Adres2[10], MailServer, FromName, FromStation;
        int YNMail, NAdres1, NAdres2, NumStation;
        void SendMailIon(void);
        void SendOneMail(AnsiString MailAdres, AnsiString MailText);
        __fastcall TTelegr(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TTelegr *Telegr;
//---------------------------------------------------------------------------
#endif
