Poco::Net

class SMTPChannel

Library: Net
Package: Logging
Header: Poco/Net/SMTPChannel.h

Description

This Channel implements SMTP (email) logging.

Inheritance

Direct Base Classes: Poco::Channel

All Base Classes: Poco::Channel, Poco::Configurable, Poco::RefCountedObject

Member Summary

Member Functions: close, getProperty, log, open, registerChannel, setProperty

Inherited Functions: close, duplicate, getProperty, log, open, referenceCount, release, setProperty

Constructors

SMTPChannel

SMTPChannel();

Creates a SMTPChannel.

SMTPChannel

SMTPChannel(
    const std::string & mailhost,
    const std::string & sender,
    const std::string & recipient
);

Creates a SMTPChannel with the given target mailhost, sender, and recipient.

Destructor

~SMTPChannel protected virtual

~SMTPChannel();

Member Functions

close virtual

void close();

Closes the SMTPChannel.

See also: Poco::Channel::close()

getProperty virtual

std::string getProperty(
    const std::string & name
) const;

Returns the value of the property with the given name.

See also: Poco::Channel::getProperty()

log virtual

void log(
    const Message & msg
);

Sends the message's text to the recipient.

See also: Poco::Channel::log()

open virtual

void open();

Opens the SMTPChannel.

See also: Poco::Channel::open()

registerChannel static

static void registerChannel();

Registers the channel with the global LoggingFactory.

setProperty virtual

void setProperty(
    const std::string & name,
    const std::string & value
);

Sets the property with the given value.

The following properties are supported:

See also: Poco::Channel::setProperty()

Variables

PROP_ATTACHMENT static

static const std::string PROP_ATTACHMENT;

PROP_DELETE static

static const std::string PROP_DELETE;

PROP_LOCAL static

static const std::string PROP_LOCAL;

PROP_MAILHOST static

static const std::string PROP_MAILHOST;

PROP_RECIPIENT static

static const std::string PROP_RECIPIENT;

PROP_SENDER static

static const std::string PROP_SENDER;

PROP_THROW static

static const std::string PROP_THROW;

PROP_TYPE static

static const std::string PROP_TYPE;