FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Mail Class Reference
Inheritance diagram for Mail:
Html File Handler Thing

Public Member Functions

 send ()
 
 add ($prio, $message, $context)
 
- Public Member Functions inherited from Html
 add ($prio, $message, $context)
 
- Public Member Functions inherited from File
 add ($prio, $message, $context)
 
 deleteNext ()
 Delete the file for the next period (when rotating logs). More...
 
- Public Member Functions inherited from Handler
 __construct ($log, $config, $name=null)
 
 add ($prio, $message, $context)
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Data Fields

 $threshold = \Rsi\Fred\Log::ERROR
 
 $interval = 60
 Minimal mail interval (minutes). More...
 
 $deadline = 24 * 60
 Maximum mail interval (minutes). More...
 
 $from = null
 Sender (defaults to default From address). More...
 
 $to = null
 Send mail to this address (or array for multiple; defaults to default From address). More...
 
 $subject = 'Log *'
 Subject for the mail (an asterisk is replaced with the host name). More...
 
 $templateSkipped
 Template when skipping (an asterisk is replaced with the number of bytes skipped). More...
 
 $templateFile = __DIR__ . '/mail.html'
 File with mail template ([time], [host], [ip] of server, [index] and. More...
 
- Data Fields inherited from Html
 $templateIndex
 Index template ([id] of item, [time], [prio], [name] of prio, and [message] are replaced). More...
 
- Data Fields inherited from File
 $format = null
 
 $dateTimeFormat = 'Y-m-d H:i:s'
 
 $separator = "\n*****\n\n"
 
 $maxSize = 102400
 
- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 

Protected Member Functions

 format ($prio, $context)
 
 getFilename ()
 
 getTimeFilename ()
 
- Protected Member Functions inherited from Html
 value ($value)
 
 format ($prio, $context)
 
 getIndexFilename ()
 
- Protected Member Functions inherited from File
 format ($prio, $context)
 
 getFilename ()
 
- Protected Member Functions inherited from Handler
 init ()
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Additional Inherited Members

- Protected Attributes inherited from Html
 $_lastInsertId = null
 
- Protected Attributes inherited from File
 $_filename = null
 
 $_lastInsertTime = null
 
- Protected Attributes inherited from Handler
 $_log
 
 $_config = null
 
 $_name = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 5 of file Mail.php.

Member Function Documentation

◆ add()

add (   $prio,
  $message,
  $context 
)

Definition at line 68 of file Mail.php.

◆ format()

format (   $prio,
  $context 
)
protected

Definition at line 20 of file Mail.php.

◆ getFilename()

getFilename ( )
protected

Definition at line 77 of file Mail.php.

◆ getTimeFilename()

getTimeFilename ( )
protected

Definition at line 82 of file Mail.php.

◆ send()

send ( )

Definition at line 28 of file Mail.php.

Field Documentation

◆ $deadline

$deadline = 24 * 60

Maximum mail interval (minutes).

Definition at line 9 of file Mail.php.

◆ $from

$from = null

Sender (defaults to default From address).

Definition at line 10 of file Mail.php.

◆ $interval

$interval = 60

Minimal mail interval (minutes).

Definition at line 8 of file Mail.php.

◆ $subject

$subject = 'Log *'

Subject for the mail (an asterisk is replaced with the host name).

Definition at line 12 of file Mail.php.

◆ $templateFile

$templateFile = __DIR__ . '/mail.html'

File with mail template ([time], [host], [ip] of server, [index] and.

Definition at line 17 of file Mail.php.

◆ $templateSkipped

$templateSkipped
Initial value:
= '
<tr><td colspan="2"><hr></td></tr>
<tr><td class="skipped" colspan="2">Skipped * bytes</td><tr>'

Template when skipping (an asterisk is replaced with the number of bytes skipped).

Definition at line 13 of file Mail.php.

◆ $threshold

$threshold = \Rsi\Fred\Log::ERROR

Definition at line 7 of file Mail.php.

◆ $to

$to = null

Send mail to this address (or array for multiple; defaults to default From address).

Definition at line 11 of file Mail.php.


The documentation for this class was generated from the following file: