mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-12 22:19:00 +00:00

* Update notify.mailgun.markdown Fix inconsistency where "domain" is required in the Mailgun Component https://www.home-assistant.io/components/mailgun/ but "sandbox" can also be used to specify the domain. It appears that the package https://github.com/pschmitt/pymailgunner in def guess_domain(...) allows multiple domains and "sandbox" can be used to choose a sandbox domain over a normal domain. As far as I can tell, this feature isn't used by the Mailgun component. Also removed all references to the obsolete word "token" to avoid confusion. Also used a different name for the notify service to differentiate it from the mailgun component. Note: There are also updates to the aforementioned Mailgun Component doc. * There is no need for the postfix
1.7 KiB
1.7 KiB
layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category | ha_release |
---|---|---|---|---|---|---|---|---|---|---|
page | Mailgun Notify | Instructions on how to add Mailgun mail notifications to Home Assistant. | 2017-02-06 16:52 | true | false | true | true | mailgun.png | Notifications | 0.38 |
The Mailgun notification service allows you to send emails via Mailgun's REST API. It requires the Mailgun component to be set up.
{% linkable_title Sample configuration %}
# Example configuration.yaml entry
mailgun:
domain: mg.example.com
api_key: XXXXXXXXXXXXXX
notify:
- name: mailgun
platform: mailgun
recipient: me@example.com
Configuration variables:
- domain (Required): This is the domain name to be used when sending out mail.
- sandbox (Deprecated): If a sandboxed domain is used, specify it in
domain
. Defaults toFalse
. - api_key (Required): This is the API Key that has been generated in your Mailgun account.
- recipient (Required): The email address of the recipient.
- sender (Optional): The sender's email address. Defaults to
hass@DOMAIN
, whereDOMAIN
is the outgoing mail domain, as defined by thedomain
configuration entry.
{% linkable_title Example automation %}
The following automation reacts to an event by sending out an email with two attachments.
# Example automation using Mailgun notifications
automation:
trigger:
platform: event
event_type: SPECIAL_EVENT
action:
service: notify.mailgun
data:
title: "Something special has happened"
message: "This a test message from Home Assistant"
data:
images:
- /home/pi/pic_test1.png
- /home/pi/pic_test2.png