openhab-docs/_addons_actions/mail
Thomas Dietrich 826ef4abb4 Distinguish collections, improve update process ()
* Rename collection folders

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Change all occurences of addons and repos

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Add further corrections

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Remove temporary directories after processing

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Reduce addons menus, show current uncond.

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Fix typo

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Remove redundant addons from permalinks

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Sort UI menu entries correctly

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>

* Split maven command

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
2017-09-22 21:05:09 +02:00
..
readme.md Distinguish collections, improve update process () 2017-09-22 21:05:09 +02:00

readme.md

id label title type description source since install
mail Mail Mail - Actions action This add-on provides SMTP services so your rules and scripts can send e-mails. The `to` paremeter can contain a semicolon-separated list of email addresses. https://github.com/openhab/openhab1-addons/blob/master/bundles/action/org.openhab.action.mail/README.md 1x auto

{% include base.html %}

Mail Actions

This add-on provides SMTP services so your rules and scripts can send e-mails. The to paremeter can contain a semicolon-separated list of email addresses.

Actions

  • sendMail(String to, String subject, String message): Sends an email via SMTP.
  • sendMail(String to, String subject, String message, String attachmentUrl): Sends an email with attachment via SMTP.
  • sendMail(String to, String subject, String message, List<String> attachmentUrlList): Sends an email with one or more attachments via SMTP.

Configuration

This action service can be configured via the services/mail.cfg file.

Property Default Required Description
hostname Yes SMTP server hostname, e.g. "smtp.gmail.com"
port 25 (resp. 587 for TLS/SSL) No SMTP port to use
username if the SMTP server at <hostname> and <port> requires authentication SMTP user name
password if the SMTP server at <hostname> and <port> requires authentication SMTP password
from Yes Email address to use for sending mails
tls false No true if STARTTLS is enabled (not required) for the connection
ssl false No true if SSL negotiation should occur on connection. Do not set both tls and ssl to true.
popbeforesmtp false No set to true if POP before SMTP (another authentication mechanism) should be enabled. Username and password are taken from the above configuration
charset platform default No Character set used to encode the message body

Examples

import java.util.List
...
val List<String> attachmentUrlList = newArrayList(
  "http://some.web/site/snap.jpg&param=value",
  "http://192.168.1.100/data.txt",
  "file:///tmp/201601011031.jpg")
sendMail("you@email.net", "Test", "This is the message.", attachmentUrlList)