I am able to send emails with either smtp using a google account or the google mail integration.
But when I add
images:
- /config/www/tmp/something.jpg
when sending either way, I get extra keys not allowed @ data[images]. The google mail integration does not list images: as a possible attribute.
When I send emails from my home camera and doorbell with a gmail account I am able to send pictures so I’m really surprised I can’t with HA. Is there some kind of work around for this? I really want to be able to send pictures from my cameras. Keeping my fingers crossed!
I wonder why I get the error on images then. I think I’ll remove the Google mail integration just to make sure it isn’t having any effect on my SMTP attempts.
I’m not able to send images either but I’m using the Google Mail integration.
(I used to be able to fine before shifting to the integration method because of the GM app security changes).
I can send an email from this service call fine, but no image is being attached just the title and message text. Not getting a failure or error message.
I am wondering if Google Mail is blocking the attachments, or if I’m missing something about using SMTP?
Using this service call inside a triggered automation (template details replaced by xxxxxx)
service: notify.xxxxxxx
data:
message: The garage door has been open for 10 minutes.
title: Your Garage Door Friend
target: xxxxxxxx
data:
images:
- /share/mycamera/snapshot_camera.jpg
Make sure you can actually access the image in your path. My gmail does send images. Here is my images path for reference. /config/www/snapshots/porch_latest.jpg
Cheers for the response. Yep double checked after your suggestion. No seems fine as it’s also the path string used by my Telegram service that is sending the same images fine.
Trying to resolve this non transmission of images. I note that in the HA Google Mail integrations usage description that ‘images’ is not listed in the attributes valid for ‘data’ key…
Does this mean it’s never been an option, or as usual I don’t understand something?
Yep I hear you about SMTP. Up until late last year I too ONLY used the SMTP service via notify: in my config.yaml, with images, just fine.
Then something changed, either Gmail credential requirements or it broke in HA, but whatever I try now via configured via SMTP now fails. Tried to reconfigure for gmail using app passwords etc and then tried outlook email from fresh, neither work (though never had outlook before). SMTP service via ‘developer’ options indicates the emails are sent, but nothing arrives at the addressed mailbox, there are some vague log errors for SMTP.
From googling the log errors caused by SMTP I’m not alone, there a few other users who’s SMTP broke in the last 5-6 months without much clue other than maybe issues with StartTLS encryption.
So, I’d hoped the HA Google Mail integration would fix my problem, I could move on. It does send, but not with an attachment. Didn’t see that in the description…
I never got this to work with the gmail integration - I’m using smtp. I send images all of the time from my cameras. I’m also emailing texts to my phones with pictures.
Here’s my notify.yaml - are you using the same port?
frontdoor_camera_motion_email:
alias: frontdoor_camera_motion_email
sequence:
- service: notify.gmail_smtp_email
data:
message: ''
title: Person has been detected at the front door {{ now().strftime("%-m.%-d.%Y
%-I:%M:%S %p") }}
data:
images:
- /config/www/tmp/FrontdoorCameraMotionTrigger.jpg
mode: single
icon: mdi:email-alert-outline
This no longer works for me as I said, no emails are sent. I blew those blocks away and rebuilt it, no change, tried using outlook.com service, no different results.
At this point time I’m just going to leave it alone, I’ve spent WAY too long trying in my amateur way to resolve it. At least Telegram notifications are sending the images fine to my phone, that will have to do for now. Thanks guys.