nanoserv
[ class tree: nanoserv ] [ index: nanoserv ] [ all elements ]

Class: NS_SMTP_Service_Handler

Source Location: /handlers/NS_SMTP_Service_Handler.php

Class Overview

NS_Handler
   |
   --NS_Connection_Handler
      |
      --NS_Line_Input_Connection_Handler
         |
         --NS_SMTP_Service_Handler

SMTP Service handler class


Author(s):

Variables

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: NS_Line_Input_Connection_Handler

NS_Line_Input_Connection_Handler::on_Read()
NS_Line_Input_Connection_Handler::on_Read_Line()
Event called on new line of data

Class: NS_Connection_Handler

NS_Connection_Handler::Connect()
Connect
NS_Connection_Handler::Disconnect()
Disconnect
NS_Connection_Handler::on_Accept()
Event called on received connection
NS_Connection_Handler::on_Connect()
Event called on established connection
NS_Connection_Handler::on_Connect_Fail()
Event called on failed connection
NS_Connection_Handler::on_Disconnect()
Event called on disconnection
NS_Connection_Handler::on_Fork_Done()
Event called after forking, both on master and child processes
NS_Connection_Handler::on_Fork_Prepare()
Event called before forking
NS_Connection_Handler::on_Read()
Event called on data reception
NS_Connection_Handler::Write()
Send data over the connection
NS_Connection_Handler::Write_Stream()
Send open stream over the connection

Class: NS_Handler

NS_Handler::Set_Option()
Set a stream context option

Class Details

[line 38]
SMTP Service handler class



Tags:

abstract:  


[ Top ]


Class Variables

$data_buffer =  ""

[line 73]

Mail data buffer



Tags:

access:  protected

Type:   string


[ Top ]

$env_from =  ""

[line 61]

Enveloppe sender



Tags:

access:  protected

Type:   string


[ Top ]

$env_rcpt = array()

[line 67]

Enveloppe recipents



Tags:

access:  protected

Type:   array


[ Top ]

$helo_message =  ""

[line 55]

HELO message



Tags:

access:  protected

Type:   string


[ Top ]

$hostname =

[line 49]

Hostname



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 84]

NS_SMTP_Service_Handler __construct( )

SMTP Service Handler constructor



Tags:

access:  public


[ Top ]

method on_Accept [line 90]

void on_Accept( )



Tags:

access:  public


Overrides NS_Connection_Handler::on_Accept() (Event called on received connection)

[ Top ]

method on_Mail [line 245]

bool on_Mail( string $env_from, array $env_to, string $data)

Event called on mail reception

if true is returned, a "message accepted" reply will be sent, and "message rejected" for false




Tags:

access:  public


Parameters:

string   $env_from  
array   $env_to  
string   $data   this includes mail headers and content

[ Top ]

method on_Read_Line [line 96]

void on_Read_Line( $data)



Tags:

access:  public


Overrides NS_Line_Input_Connection_Handler::on_Read_Line() (Event called on new line of data)

Parameters:

   $data  

[ Top ]

method on_SMTP_HELO [line 185]

bool on_SMTP_HELO( string $data)

Event called on SMTP HELO reception

Extend this method to return the boolean status of the session (false = disconnect client)




Tags:

access:  public


Parameters:

string   $data   remote HELO message

[ Top ]

method on_SMTP_MAIL_FROM [line 199]

bool on_SMTP_MAIL_FROM( string $data)

Event called on SMTP MAIL FROM reception

Extend this method to return the boolean status of the session (false = disconnect client)




Tags:

access:  public


Parameters:

string   $data   remote MAIL FROM message

[ Top ]

method on_SMTP_RCPT_TO [line 213]

bool on_SMTP_RCPT_TO( string $data)

Event called on SMTP RCPT TO reception

Extend this method to return the boolean status of the session (false = disconnect client)




Tags:

access:  public


Parameters:

string   $data   remote RCPT TO message

[ Top ]

method on_SMTP_Unhandled [line 227]

bool on_SMTP_Unhandled( string $data)

Event called on unknown SMTP command reception

Extend this method to return the boolean status of the session (false = disconnect client)




Tags:

access:  public


Parameters:

string   $data   entire command line

[ Top ]


Class Constants

SERVER_STRING =  ""

[line 43]

Server string


[ Top ]



Documentation generated on Thu, 10 May 2012 22:01:24 +0200 by phpDocumentor 1.4.4