esppy.connectors.SMTPSubscriber

class esppy.connectors.SMTPSubscriber(smtpserver=None, sourceaddress=None, destaddress=None, name=None, is_active=None, snapshot=None, collapse=None, emailperevent=None, rmretdel=None, configfilesection=None, dateformat=None)

Bases: esppy.connectors.base.Connector

Subscribe to Simple Mail Transfer Protocol (SMTP) events

Parameters
smtpserverstring

Specifies the SMTP server host name or IP address

sourceaddressstring

Specifies the e-mail address to be used in the “from” field of the e-mail.

destaddressstring

Specifies the e-mail address to which to send the e-mail message

snapshotboolean, optional

Specifies whether to send snapshot data

collapsestring, optional

Enables conversion of UPDATE_BLOCK events to make subscriber output publishable. The default value is disabled.

emailpereventboolean, optional

Specifies true or false. The default is false. If false, each e-mail body contains a full event block. If true, each mail body contains a single event.

rmretdelboolean, optional

Specifies to remove all delete events from event blocks received by a subscriber that were introduced by a window retention policy.

configfilesectionstring, optional

Specifies the name of the section in the connoctor config file to parse for configuration parameters. Specify the value as [configfilesection].

dateformatstring, optional

Specifies the format of ESP_DATETIME and ESP_TIMESTAMP fields in CSV events. The default behavior is these fields are interpreted as an integer number of seconds (ESP_DATETIME) or microseconds (ESP_TIMESTAMP) since epoch.

Returns
SMTPSubscriber
__init__(self, smtpserver=None, sourceaddress=None, destaddress=None, name=None, is_active=None, snapshot=None, collapse=None, emailperevent=None, rmretdel=None, configfilesection=None, dateformat=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self[, smtpserver, sourceaddress, …])

Initialize self.

clear(self)

copy(self[, deep])

Return a copy of the object

from_element(data[, session])

Construct connector from XML definition

from_parameters(conncls[, type, name, …])

from_xml(data[, session])

Construct connector from XML definition

get(self, key[, default])

items(self)

keys(self)

pop(self, key[, default])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem(self)

as a 2-tuple; but raise KeyError if D is empty.

set_properties(self, \*\*kwargs)

Set connector properties

setdefault(self, key[, default])

to_element(self)

Export connector definition to ElementTree.Element

to_xml(self[, pretty])

Export connector definition to XML

update(\*args, \*\*kwds)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values(self)

Attributes

connector_key

property_defs