Email with attachments

Hi to all DEVs!

Are there any plans to add the email with attachments to HA?
Apparently this is something that lots of people have already tried but only sent emails without attachments, even when using the google Mail integration.


  • I want to email attachments
  • Just texts emails are fine
  • Emails are a security threat. Don’t want it.

0 voters

Already possible Is anyone able to email pictures using gmail?

Glad I hadn’t read before that it can’t be done, because I’ve been doing that for years!

I have an automation that activates on a movement sensor, then grabs a still image from two cctv cameras and saves them to a local filesystem. Then I run a script that sends an email and attaches the pictures - so I can see who’s at the door.

This is the script, for what it’s worth. Requires the Mime::Lite perl module installed and it’s run on a remote linux server.

# Send images from CCTV to me by email

use strict;
use warnings;
use MIME::Lite;

system("wget '' -O cctv1.jpg -q");

# axis frontdoor cam
system("wget -O cctv2.jpg -q");

my $msg = MIME::Lite->new(
                To =>'email_to_address',
                From => 'email_from_address',
                Subject =>'Driveway Sensor',
                Type =>'multipart/related' );

 $msg->attach(Type => 'text/html', Data => qq{
         <body> CCTV Footage:
         <img src="cid:myimage.jpg"> </body>
         <img src="cid:myimage2.jpg"> </body>
         } );
 $msg->attach(Type => 'image/jpg', Id => 'cctv.jpg', Path => 'cctv1.jpg', );
 $msg->attach(Type => 'image/jpg', Id => 'cctv2.jpg', Path => 'cctv2.jpg', );

system("rm cctv?.jpg");

1 Like

Actually this embeds the picture which is what I wanted in the referenced post. This person would like to include it as an attachment. I’m a noob but I haven’t seen the option of an attachment either.

I wish people would stop posting FRs when searching is available.

OK, I’m a noob, and apparetly I can’t search the comminity that wel…

Anyways, gmail integration still doesn’t send imagns.

service: notify.myemail_gmail_com
  message: Test message
  target: [email protected]
  title: Upper doorbell
    - /config/www/tmp/snapshot-doorbellsuperior.jpg


Error running action

extra keys not allowed @ data[‘images’]. Got None

If you read the link I sent, the user was using the smtp integration.