// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Insmtpbase.pas' rev: 10.00

#ifndef InsmtpbaseHPP
#define InsmtpbaseHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Inemailaddress.hpp>	// Pascal unit
#include <Inmessage.hpp>	// Pascal unit
#include <Inmessageclient.hpp>	// Pascal unit
#include <Inreply.hpp>	// Pascal unit
#include <Intcpclient.hpp>	// Pascal unit
#include <Inexplicittlsclientserverbase.hpp>	// Pascal unit
#include <Intcpconnection.hpp>	// Pascal unit
#include <Incomponent.hpp>	// Pascal unit
#include <Inbasecomponent.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Insmtpbase
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TInSMTPBase;
class PASCALIMPLEMENTATION TInSMTPBase : public Inmessageclient::TInMessageClient 
{
	typedef Inmessageclient::TInMessageClient inherited;
	
protected:
	AnsiString FMailAgent;
	AnsiString FHeloName;
	bool FPipeline;
	bool FUseEHLO;
	virtual bool __fastcall GetSupportsTLS(void);
	virtual TMetaClass* __fastcall GetReplyClass(void);
	virtual void __fastcall InitComponent(void);
	void __fastcall SendGreeting(void);
	virtual void __fastcall SetUseEhlo(const bool AValue);
	void __fastcall SetPipeline(const bool AValue);
	void __fastcall StartTLS(void);
	void __fastcall WriteRecipientNoPipelining(const Inemailaddress::TInEMailAddressItem* AEmailAddress);
	void __fastcall WriteRecipientsNoPipelining(Inemailaddress::TInEMailAddressList* AList);
	void __fastcall SendNoPipelining(Inmessage::TInMessage* AMsg, Inemailaddress::TInEMailAddressList* ARecipients)/* overload */;
	void __fastcall WriteRecipientPipeLine(const Inemailaddress::TInEMailAddressItem* AEmailAddress);
	void __fastcall WriteRecipientsPipeLine(Inemailaddress::TInEMailAddressList* AList);
	void __fastcall SendPipelining(Inmessage::TInMessage* AMsg, Inemailaddress::TInEMailAddressList* ARecipients);
	void __fastcall InternalSend(Inmessage::TInMessage* AMsg, Inemailaddress::TInEMailAddressList* ARecipients)/* overload */;
	
public:
	virtual void __fastcall Send(Inmessage::TInMessage* AMsg) = 0 ;
	
__published:
	__property AnsiString MailAgent = {read=FMailAgent, write=FMailAgent};
	__property AnsiString HeloName = {read=FHeloName, write=FHeloName};
	__property bool UseEhlo = {read=FUseEHLO, write=SetUseEhlo, default=1};
	__property bool PipeLine = {read=FPipeline, write=SetPipeline, default=1};
public:
	#pragma option push -w-inl
	/* TInMessageClient.Destroy */ inline __fastcall virtual ~TInSMTPBase(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TInBaseComponent.Create */ inline __fastcall TInSMTPBase(Classes::TComponent* AOwner)/* overload */ : Inmessageclient::TInMessageClient(AOwner) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const bool DEF_SMTP_PIPELINE = true;
static const bool IdDEF_UseEhlo = true;
#define CAPAPIPELINE "PIPELINING"
#define XMAILER_HEADER "X-Mailer"
extern PACKAGE short RCPTTO_ACCEPT[2];
extern PACKAGE short MAILFROM_ACCEPT;
extern PACKAGE short DATA_ACCEPT;
extern PACKAGE short DATA_PERIOD_ACCEPT;
#define RSET_CMD "RSET"
#define MAILFROM_CMD "MAIL FROM:"
#define RCPTTO_CMD "RCPT TO:"
#define DATA_CMD "DATA"

}	/* namespace Insmtpbase */
using namespace Insmtpbase;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Insmtpbase
