Homeassistant MMS text through email with HTML

Does anyone have a working example of sending a text with a camera snapshot to their cell phone? I would like to see the picture inline in the email so it will display inline for the MMS message.

I have reviewed SMTP/notify docs as well as camera and snapshot docs, but cannot figure out the html part to send the image inline, not as an attachment.

Yes, but the details will have to wait until I’m at my computer.

1 Like

I figured it out. If anyone gets an error that says unable to determine mime subtype, use imagmagick to convert the jpg to jpg. Fixed my issue.

Here is an example.

I ended up not using html to send the image inline for MMS. I used the normal smtp notify config with image attachment.

I previously did this.
Will try to find the automation

Glad you got it working. Sorry I didn’t provide the details earlier. Just for reference, below are the pieces of what I did.

homeassistant:
  whitelist_external_dirs:
  - /home/homeassistant/.homeassistant/snapshots
notify:
- name: sms
  platform: smtp
  server: !secret notify_snd_email_server
  sender: !secret notify_snd_email_username
  username: !secret notify_snd_email_username
  password: !secret notify_snd_email_password
  recipient: !secret notify_mms_address
script:
  snapshot:
    sequence:
    - service: camera.snapshot
      data:
        entity_id: camera.XXX
        filename: /home/homeassistant/.homeassistant/snapshots/XXX.jpg
    - delay: 4
    - service: notify.sms
      data:
        title: Motion
        message: Motion
        data:
          images:
          - /home/homeassistant/.homeassistant/snapshots/XXX.jpg

I use Amcrest cameras and the JPEG images they output work as is in the e-mail, which ultimately goes to my phone via MMS because the recipient e-mail is of the form: [email protected].