Library: Net
Package: Logging
Header: Poco/Net/SMTPChannel.h
This Channel implements SMTP (email) logging.
Direct Base Classes: Poco::Channel
All Base Classes: Poco::Channel, Poco::Configurable, Poco::RefCountedObject
Member Functions: close, getProperty, log, open, registerChannel, setProperty
Inherited Functions: close, duplicate, getProperty, log, open, referenceCount, release, setProperty
SMTPChannel();
Creates a 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.
~SMTPChannel();
void close();
Closes the SMTPChannel.
See also: Poco::Channel::close()
std::string getProperty(
const std::string & name
) const;
Returns the value of the property with the given name.
See also: Poco::Channel::getProperty()
void log(
const Message & msg
);
Sends the message's text to the recipient.
See also: Poco::Channel::log()
void open();
Opens the SMTPChannel.
See also: Poco::Channel::open()
static void registerChannel();
Registers the channel with the global LoggingFactory.
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()
static const std::string PROP_ATTACHMENT;
static const std::string PROP_DELETE;
static const std::string PROP_LOCAL;
static const std::string PROP_MAILHOST;
static const std::string PROP_RECIPIENT;
static const std::string PROP_SENDER;
static const std::string PROP_THROW;
static const std::string PROP_TYPE;