Hi,
I’m really going crazy with this topic. Spend a lot of time with paths, / and no /, ‘’ and no ‘’ etc - lot of different configs but nothing working.
I’m using Home Assistant OS in a virtual machine and try to send a pic (taken by cctv cam) as email attachement.
First of all, picture is taken with this automation:
action: camera.snapshot
metadata: {}
data:
filename: /config/www/tmp/reolink.jpg
target:
device_id: 123
delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
and then the part where the email is sent:
action: notify.gmail_info
metadata: {}
data:
title: test
target: [email protected]
message: "123"
data:
images:
- /local/tmp/reolink.jpg
html: >
<html> <img src="cid:reolink.jpg"> </html>
Email is arriving, but w/o a pic in it. Same when I change the path from /local/tmp/ to /config/www/tmp
And log file is telling me
Logger: homeassistant.components.smtp.notify
Source: components/smtp/notify.py:279
integration: smtp
First occurred: 7:23:32 AM (1 occurrences)
Last logged: 7:23:32 AM
Attachment /local/tmp/reolink.jpg not found. Skipping
This automation for sending the pic via HA mobile app is working
action: notify.mobile_app_iphonejos
metadata: {}
data:
message: test
data:
attachment:
content-type: jpeg
url: /local/tmp/reolink.jpg
There the pic is attached
In configuration.yaml i have
homeassistant:
allowlist_external_dirs:
- '/config/www/tmp'
I’m really out of clues and going crazy, where the problem could be
edit:
additional info: pic is visible as it should be in
http://HAIP:8123/local/tmp/reolink.jpg