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 File
 deleteNext ()
 Delete the file for the next period (when rotating logs). More...
 
- Public Member Functions inherited from Handler
 __construct ($log, $config, $name=null)
 
 periodMessages ($start, $end=null)
 Unique period messages within a period. More...
 
 periods ($message, $start, $end=null)
 Periods for a messages within a period. More...
 
- 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

 $maxLines = null
 Maximum numbers of lines to show (hide + click-to-show when larger than this; empty = show all). More...
 
 $templateMaxLines
 
 $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
 $hashFormat = "hash-*"
 Asterisk is replaced by hash of prio + message. Must be regex safe (besides the asterisk). More...
 
 $templateIndex
 Index template ([id] of item, [time], [prio], [name] of prio, [message], and hash of prio + 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

 value ($value)
 
 format ($prio, $context)
 
 getFilename ()
 
 getTimeFilename ()
 
- Protected Member Functions inherited from Html
 getIndexFilename ()
 
- 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...
 
 alias ($alias, $property, $object=null)
 Define an alias for a property (of another object). 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...
 
 $_aliases = []
 Alias properties (key = alias, value = [object,property]). More...
 

Detailed Description

Definition at line 5 of file Mail.php.

Member Function Documentation

◆ add()

add (   $prio,
  $message,
  $context 
)

Reimplemented from Html.

Definition at line 94 of file Mail.php.

◆ format()

format (   $prio,
  $context 
)
protected

Reimplemented from Html.

Definition at line 35 of file Mail.php.

◆ getFilename()

getFilename ( )
protected

Reimplemented from File.

Definition at line 103 of file Mail.php.

◆ getTimeFilename()

getTimeFilename ( )
protected

Definition at line 108 of file Mail.php.

◆ send()

send ( )

Definition at line 43 of file Mail.php.

◆ value()

value (   $value)
protected

Reimplemented from Html.

Definition at line 26 of file Mail.php.

Field Documentation

◆ $deadline

$deadline = 24 * 60

Maximum mail interval (minutes).

Definition at line 15 of file Mail.php.

◆ $from

$from = null

Sender (defaults to default From address).

Definition at line 16 of file Mail.php.

◆ $interval

$interval = 60

Minimal mail interval (minutes).

Definition at line 14 of file Mail.php.

◆ $maxLines

$maxLines = null

Maximum numbers of lines to show (hide + click-to-show when larger than this; empty = show all).

Definition at line 7 of file Mail.php.

◆ $subject

$subject = 'Log *'

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

Definition at line 18 of file Mail.php.

◆ $templateFile

$templateFile = __DIR__ . '/mail.html'

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

Definition at line 23 of file Mail.php.

◆ $templateMaxLines

$templateMaxLines
Initial value:
= "
<div class='more'>
<input type='checkbox' id='[id]'> <label for='[id]'>show [lines] lines</label>
<div>[value]</div>
</div>"

Definition at line 8 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 19 of file Mail.php.

◆ $threshold

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

Definition at line 13 of file Mail.php.

◆ $to

$to = null

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

Definition at line 17 of file Mail.php.


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