flexget.components.notify.notifiers.email module#

class flexget.components.notify.notifiers.email.EmailNotifier[source]#

Bases: object

Send an e-mail with the list of all succeeded (downloaded) entries.

Configuration options

Option

Description

from

The email address from which the email will be sent (required)

to

The email address of the recipient (required)

smtp_host

The host of the smtp server

smtp_port

The port of the smtp server

smtp_username

The username to use to connect to the smtp server

smtp_password

The password to use to connect to the smtp server

smtp_tls

Should we use TLS to connect to the smtp server

smtp_ssl

Should we use SSL to connect to the smtp server

Config basic example:

notify:
  entries:
    via:
      - email:
          from: xxx@xxx.xxx
          to: xxx@xxx.xxx
          smtp_host: smtp.host.com

Config example with smtp login:

notify:
  entries:
    via:
      - email:
          from: xxx@xxx.xxx
          to: xxx@xxx.xxx
          smtp_host: smtp.host.com
          smtp_port: 25
          smtp_login: true
          smtp_username: my_smtp_login
          smtp_password: my_smtp_password
          smtp_tls: true

GMAIL example:

notify:
  entries:
    via:
      - email:
          from: from@gmail.com
          to: to@gmail.com
          smtp_host: smtp.gmail.com
          smtp_port: 587
          smtp_login: true
          smtp_username: gmailUser
          smtp_password: gmailPassword
          smtp_tls: true

Default values for the config elements:

notify:
  entries:
    via:
      - email:
          smtp_host: localhost
          smtp_port: 25
          smtp_login: False
          smtp_username:
          smtp_password:
          smtp_tls: False
          smtp_ssl: False
connect_to_smtp_server(config)[source]#
notify(title, message, config)[source]#

Send an email notification.

Parameters:
  • message (str) – message body

  • title (str) – message subject

  • config (dict) – email plugin config

schema = {'additionalProperties': False, 'dependentRequired': {'smtp_password': ['smtp_username'], 'smtp_ssl': ['smtp_tls'], 'smtp_username': ['smtp_password']}, 'properties': {'autofrom': {'default': False, 'type': 'boolean'}, 'from': {'default': 'flexget_notifer@flexget.com', 'format': 'email', 'type': 'string'}, 'html': {'default': False, 'type': 'boolean'}, 'smtp_host': {'default': 'localhost', 'type': 'string'}, 'smtp_password': {'type': 'string'}, 'smtp_port': {'default': 25, 'type': 'integer'}, 'smtp_ssl': {'default': False, 'type': 'boolean'}, 'smtp_tls': {'default': False, 'type': 'boolean'}, 'smtp_username': {'type': 'string'}, 'to': {'oneOf': [{'items': {'format': 'email', 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'format': 'email', 'title': 'single value', 'type': 'string'}]}}, 'required': ['to'], 'type': 'object'}#
flexget.components.notify.notifiers.email.register_plugin()[source]#