SMTP notify enhancements: full HTML emails and custom product_name in email headers#7533
Conversation
- Send full HTML emails, with or without inline attached images. - Custom `timeout`. - Custom `product_name` identifier for the `FROM` and `X-MAILER` email headers. - New HTML email test
|
@azogue, thanks for your PR! By analyzing the history of the files in this pull request, we identified @stratosmacker, @pvizeli and @partofthething to be potential reviewers. |
|
What is the benefit for custom |
|
The The change in the |
| msg['From'] = self._sender | ||
| msg['X-Mailer'] = 'HomeAssistant' | ||
| msg['From'] = '{} <{}>'.format(self._product_name, self._sender) | ||
| msg['X-Mailer'] = self._product_name |
There was a problem hiding this comment.
The X-Mailer should stick to HomeAssistant, as that's the product that emails it.
| vol.Optional(CONF_STARTTLS, default=DEFAULT_STARTTLS): cv.boolean, | ||
| vol.Optional(CONF_USERNAME): cv.string, | ||
| vol.Optional(CONF_PASSWORD): cv.string, | ||
| vol.Optional(CONF_PRODUCT_NAME, default=DEFAULT_PRODUCT_NAME): cv.string, |
There was a problem hiding this comment.
I don't like the word product name, can you use CONF_SENDER_NAME instead?
- Change `sender_name` instead of `product_name`. - No changes in `X-Mailer` header. - `From` header as always unless you define the new `sender_name` parameter.
|
@balloob, changes are done here and in the doc, so I think it's ready. Do you want me to edit the PR subject and description? |
Description:
product_nameidentifier in theFROMandX-MAILERemail headers.Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2607
Example entry for
configuration.yaml(if applicable):Checklist: