I’ve read just about every Google search result on HA’s SMTP integration and sending images and I still am failing.
I have the following in my configuration.yaml file:
homeassistant:
allowlist_external_dirs:
- "/config/media"
notify:
- platform: smtp
name: "family_sms"
server: "░░░░░░.░░░░░░░░░.com"
port: 465
encryption: tls
username: !secret smtp_user
password: !secret smtp_pass
sender: "░░░░░░░░░░░@░░░░░░░░.net"
sender_name: Home Assistant
recipient:
- "░░░░░░░░░@░░░░░░░░░.com"
- "░░░░░░░@░░░░░░.net"
My STMP recipients are an email address and a MMS recipient via email forwarder.
And this in my test automation:
alias: Camera Detection Test
description: ""
triggers: []
conditions: []
actions:
- action: camera.snapshot
metadata: {}
data:
filename: /config/media/temp4.jpg
target:
entity_id: camera.ai_pro_driveway_high_resolution_channel
- action: notify.family_sms
metadata: {}
data:
message: test
title: sms test
data:
image:
- /config/media/temp4.jpg
html: |
<img src="cid:temp4.jpg">
mode: single
By selecting “run actions” on my test automation, I’ve verified that the snapshot is actually being created:
and I can view it locally:
I am receiving both the email and MMS message but without the image! The email just show a broken image icon, and the MMS message just has the subject/title and the message text.
Above is the in-line image test, but I have tried sending it as an attachment by removing the two lines
html: |
<img src="cid:temp4.jpg">
from the automation. Results were the same. I guess it needs to be said that I also verified that I can send an email to the SMS/MMS forwarder with a picture as an attachment, or as an in-line image and successfully by using my email program. HA Core logs do not show any errors from executing the automation.
Can anyone give me an idea where to look for additional clues as to why this is not working? Thanks.