Detailed Description
Class sending emails.
- Author
- Dodonov A.A.
Definition at line 26 of file mail.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 109 of file mail.php.
{
try
{
$this->LastCallTime = microtime( true ) - $this->Timeout / 1000000;
$this->AutoMarkup =
get_package(
'page::auto_markup' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->Tags =
get_package(
'string::tags' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
Function loads settings.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 80 of file mail.php.
{
try
{
$CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$Settings->load_settings( $CachedMultyFS->get_config( __FILE__ , 'cf_mail' ) );
$this->Timeout = $Settings->get_setting( 'timeout' , 0 );
}
catch( Exception $e )
{
}
}
| send_email |
( |
|
$From, |
|
|
|
$To, |
|
|
|
$Subject, |
|
|
|
$Message, |
|
|
|
$Sender = false |
|
) |
| |
Function sends email.
- Parameters
-
| $From | - Email of the sender. |
| $To | - Address of the recipient. |
| $Subject | - Mail's subject. |
| $Message | - Mail's message. |
| $Sender | - Sender's name. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 253 of file mail.php.
{
try
{
if( microtime( true ) < $this->LastCallTime + $this->Timeout / 1000000 )
{
usleep( $this->LastCallTime + $this->Timeout / 1000000 - microtime( true ) );
}
$Subject = $this->compile_string( $Subject );
$Message = $this->compile_string( $Message );
$Headers = $this->get_headers( $From , $Sender );
if( mail( $To , $Subject , $Message , implode( '' , $Headers ) ) === false )
{
throw( new Exception( 'An error occured while sending email' ) );
}
}
catch( Exception $e )
{
}
}
Field Documentation
Cached packages.
- Author
- Dodonov A.A.
Definition at line 38 of file mail.php.
Time of the last call of the method 'send_mail'.
- Author
- Dodonov A.A.
Definition at line 64 of file mail.php.
Function call timeout.
- Author
- Dodonov A.A.
Definition at line 52 of file mail.php.
The documentation for this class was generated from the following file: