This plugin has no requirements or dependencies.
[mail] class_name = SMTP class_path = plugins.mail host = mail.example.com mail_from = mail@example.com # ssl = False # username = False # password = False [imap] class_name = IMAP class_path = plugins.mail host = mail.example.com username = smarthome password = secret # ssl = False # port = default # cycle = 300
There is no item specific configuration.
You could assign the following keywords to a logic. The matching order is as listed.
If the incoming mail subject matches the value of this key the logic will be triggerd.
If the mail is sent to specified address the logic will be triggerd.
A genric flag to trigger the logic on receiving a mail.
Attention: * You could only call one logic per mail! * If a mail is processed by a logic it will be delteted (moved to Deleted folder). * There is no email security. You have to use an infrastructure which provides security (e.g. own mail server which only accepts authenticated messages for the inbox).
[sauna] filename = sauna.py mail_to = sauna@example.com [mailbox] filename = mailbox.py mail = yes
A mail to sauna@example.com will only trigger the logic ‘sauna’. Every other mail is process by the ‘mailbox’ logic.
If a logic is triggered by this plugin it will set the trigger source to the from address and the value contains an email object.
See the phonebook logic for a logic which is triggerd by IMAP.
The SMTP object provides one function (sending) and you access without specifing a method name. sh.mail(to, subject, message) e.g. sh.mail('admin@smart.home', 'Rain: Help me', u'You could send UTF-8 encoded subjects and messages')