## Class LoggerAppenderMailEvent

Description

LoggerAppenderMailEvent appends individual log events via email.

This appender is similar to LoggerAppenderMail, except that it sends each each log event in an individual email message at the time when it occurs.

This appender uses a layout.

## Configurable parameters: ##

- **to** - Email address(es) to which the log will be sent. Multiple email addresses may be specified by separating them with a comma.
- **from** - Email address which will be used in the From field.
- **subject** - Subject of the email message.
- **smtpHost** - Used to override the SMTP server. Only works on Windows.
- **port** - Used to override the default SMTP server port. Only works on Windows.

- version: $Revision: 1343601 $
- link: Appender documentation
- license: Apache License, Version 2.0

Located in /log4php/appenders/LoggerAppenderMailEvent.php (line 43)

    LoggerConfigurable
       |
       --LoggerAppender
          |
          --LoggerAppenderMailEvent

Variable Summary
boolean $dry
string $from
integer $port
string $smtpHost
string $subject
string $to
Method Summary
void activateOptions ()
void append (LoggerLoggingEvent $event)
void getFrom ()
void getPort ()
void getSmtpHost ()
void getSubject ()
void getTo ()
void setDry ( $dry)
void setFrom ( $from)
void setPort ( $port)
void setSmtpHost ( $smtpHost)
void setSubject ( $subject)
void setTo ( $to)
Variables
boolean $dry = false (line 80)

Indiciates whether this appender should run in dry mode.

- deprecated:
- access: protected

string $from (line 49)

Email address to put in From field of the email.

- access: protected

integer $port = 25 (line 55)

Mail server port (widnows only).

- access: protected

string $smtpHost (line 61)

Mail server hostname (windows only).

- access: protected

string $subject = 'Log4php Report' (line 67)

The subject of the email.

- access: protected

string $to = null (line 73)

One or more comma separated email addresses to which to send the email.

- access: protected

#### Inherited Variables

Inherited from LoggerAppender

> LoggerAppender::$closed
> LoggerAppender::$filter
> LoggerAppender::$layout
> LoggerAppender::$name
> LoggerAppender::$requiresLayout
> LoggerAppender::$threshold

Methods
activateOptions (line 82)

- access: public

void activateOptions ()

Redefinition of:

LoggerAppender::activateOptions()
  Prepares the appender for logging.

append (line 99)

- access: public

void append (LoggerLoggingEvent $event)

- LoggerLoggingEvent $event

Redefinition of:

LoggerAppender::append()
  Forwards the logging event to the destination.

getFrom (line 132)

Returns the 'from' parameter.

- access: public

void getFrom ()
getPort (line 142)

Returns the 'port' parameter.

- access: public

void getPort ()
getSmtpHost (line 152)

Returns the 'smtpHost' parameter.

- access: public

void getSmtpHost ()
getSubject (line 162)

Returns the 'subject' parameter.

- access: public

void getSubject ()
getTo (line 172)

Returns the 'to' parameter.

- access: public

void getTo ()
setDry (line 177)

Enables or disables dry mode.

- access: public

void setDry ( $dry)

- $dry

setFrom (line 127)

Sets the 'from' parameter.

- access: public

void setFrom ( $from)

- $from

setPort (line 137)

Sets the 'port' parameter.

- access: public

void setPort ( $port)

- $port

setSmtpHost (line 147)

Sets the 'smtpHost' parameter.

- access: public

void setSmtpHost ( $smtpHost)

- $smtpHost

setSubject (line 157)

Sets the 'subject' parameter.

- access: public

void setSubject ( $subject)

- $subject

setTo (line 167)

Sets the 'to' parameter.

- access: public

void setTo ( $to)

- $to

#### Inherited Methods

Inherited From LoggerAppender

> LoggerAppender::__construct()
> LoggerAppender::activateOptions()
> LoggerAppender::addFilter()
> LoggerAppender::append()
> LoggerAppender::clearFilters()
> LoggerAppender::close()
> LoggerAppender::doAppend()
> LoggerAppender::getDefaultLayout()
> LoggerAppender::getFilter()
> LoggerAppender::getFirstFilter()
> LoggerAppender::getLayout()
> LoggerAppender::getName()
> LoggerAppender::getThreshold()
> LoggerAppender::isAsSevereAsThreshold()
> LoggerAppender::requiresLayout()
> LoggerAppender::setLayout()
> LoggerAppender::setName()
> LoggerAppender::setThreshold()
> LoggerAppender::warn()
> LoggerAppender::__destruct()

Inherited From LoggerConfigurable

> LoggerConfigurable::setBoolean()
> LoggerConfigurable::setFileSize()
> LoggerConfigurable::setInteger()
> LoggerConfigurable::setLevel()
> LoggerConfigurable::setNumeric()
> LoggerConfigurable::setPositiveInteger()
> LoggerConfigurable::setString()
> LoggerConfigurable::warn()

Documentation generated on Wed, 12 Nov 2025 18:40:32 +0900 by phpDocumentor 1.4.4