forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mail] documentation enhancement. (openhab#8177)
Signed-off-by: Gaël L'hopital <[email protected]>
- Loading branch information
1 parent
2b21016
commit 7b93fd2
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,16 +88,18 @@ sitemap demo label="Main Menu" | |
This binding includes rule actions for sending email. | ||
Six different actions available: | ||
|
||
* `sendMail(String recipient, String subject, String text)` | ||
* `sendMail(String recipient, String subject, String text, String URL)` | ||
* `sendMail(String recipient, String subject, String text, List<String> URL)` | ||
* `sendHtmlMail(String recipient, String subject, String htmlContent)` | ||
* `sendHtmlMail(String recipient, String subject, String htmlContent, String URL)` | ||
* `sendHtmlMail(String recipient, String subject, String htmlContent, List<String> URL)` | ||
* `boolean success = sendMail(String recipient, String subject, String text)` | ||
* `boolean success = sendMail(String recipient, String subject, String text, String URL)` | ||
* `boolean success = sendMail(String recipient, String subject, String text, List<String> URL)` | ||
* `boolean success = sendHtmlMail(String recipient, String subject, String htmlContent)` | ||
* `boolean success = sendHtmlMail(String recipient, String subject, String htmlContent, String URL)` | ||
* `boolean success = sendHtmlMail(String recipient, String subject, String htmlContent, List<String> URL)` | ||
|
||
The `sendMail(...)` send a plain text mail (with attachments if supplied). | ||
The `sendHtmlMail(...)` send a HTML mail (with attachments if supplied). | ||
|
||
Both functions return a boolean as the result of the operation. | ||
|
||
`recipient` can be a single address (`[email protected]`) or a list of addresses, concatenated by a comma (`[email protected], [email protected]`). | ||
|
||
Since there is a separate rule action instance for each `smtp` thing, this needs to be retrieved through `getActions(scope, thingUID)`. | ||
|
@@ -111,8 +113,8 @@ Examples: | |
|
||
``` | ||
val mailActions = getActions("mail","mail:smtp:samplesmtp") | ||
mailActions.sendMail("[email protected]", "Test subject", "This is the mail content.") | ||
mailActions.sendMail("[email protected], [email protected]", "Test subject", "This is the mail content sent to multiple recipients.") | ||
val success = mailActions.sendMail("[email protected]", "Test subject", "This is the mail content.") | ||
success = mailActions.sendMail("[email protected], [email protected]", "Test subject", "This is the mail content sent to multiple recipients.") | ||
``` | ||
|
||
|