mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
SMTP: Add documentation for notification service call (#18038)
This commit is contained in:
parent
9ba43b8cc7
commit
6d95f0e840
@ -36,7 +36,7 @@ sender:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
recipient:
|
recipient:
|
||||||
description: E-mail address of the recipient of the notification. This can be a recipient address or a list of addresses for multiple recipients.
|
description: Default E-mail address of the recipient of the notification. This can be a recipient address or a list of addresses for multiple recipients.<br>This is where you want to send your E-mail notifications by default (when not specifying `target` in the service call). Any E-mail address(es) specified in the service call's `target` field will override this recipient content.
|
||||||
required: true
|
required: true
|
||||||
type: [list, string]
|
type: [list, string]
|
||||||
server:
|
server:
|
||||||
@ -85,16 +85,16 @@ A sample configuration entry for Google Mail.
|
|||||||
notify:
|
notify:
|
||||||
- name: "NOTIFIER_NAME"
|
- name: "NOTIFIER_NAME"
|
||||||
platform: smtp
|
platform: smtp
|
||||||
server: "smtp.gmail.com"
|
server: "smtp.example.com"
|
||||||
port: 587
|
port: 587
|
||||||
timeout: 15
|
timeout: 15
|
||||||
sender: "john@gmail.com"
|
sender: "john@example.com"
|
||||||
encryption: starttls
|
encryption: starttls
|
||||||
username: "john@gmail.com"
|
username: "john@example.com"
|
||||||
password: "thePassword"
|
password: "thePassword"
|
||||||
recipient:
|
recipient:
|
||||||
- "james@gmail.com"
|
- "james@example.com"
|
||||||
- "bob@gmail.com"
|
- "bob@example.com"
|
||||||
sender_name: "My Home Assistant"
|
sender_name: "My Home Assistant"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,12 +113,16 @@ burglar:
|
|||||||
data:
|
data:
|
||||||
title: "Intruder alert"
|
title: "Intruder alert"
|
||||||
message: "Intruder alert at apartment!!"
|
message: "Intruder alert at apartment!!"
|
||||||
|
target:
|
||||||
|
- "my_intruder_alert@example.com"
|
||||||
data:
|
data:
|
||||||
images:
|
images:
|
||||||
- /home/pi/snapshot1.jpg
|
- /home/pi/snapshot1.jpg
|
||||||
- /home/pi/snapshot2.jpg
|
- /home/pi/snapshot2.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The optional `target` field is used to specify recipient(s) for this specific service call. When `target` field is not used, this message will be sent to default recipient(s), in this example, james@example.com and bob@example.com.
|
||||||
|
|
||||||
The optional `images` field adds in-line image attachments to the email. This sends a text/HTML multi-part message instead of the plain text default.
|
The optional `images` field adds in-line image attachments to the email. This sends a text/HTML multi-part message instead of the plain text default.
|
||||||
|
|
||||||
The optional `html` field makes a custom text/HTML multi-part message, allowing total freedom for sending rich html emails. In them, if you need to attach images, you can pass both arguments (`html` and `images`), the attachments will be joined with the basename of the images, so they can be included in the html page with `src="cid:image_name.ext"`.
|
The optional `html` field makes a custom text/HTML multi-part message, allowing total freedom for sending rich html emails. In them, if you need to attach images, you can pass both arguments (`html` and `images`), the attachments will be joined with the basename of the images, so they can be included in the html page with `src="cid:image_name.ext"`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user