Notifications via SMTP

In setting up SMTP notifications, the service allows for a title and message. Which, of course, does not translate well when you use SMTP to SMS.

Yes, before you even mention it, I know I could just send it to email but I don’t want such notifications going to email, I would rather use SMS as I generally will ignore email until I have the time to sit down and read it, especially at work. Anyway, just accept I do things oddly. :grin:

I have the SMTP notification set up, and I have it so that I get SMS messages when that email address is used. However, the title and message comes through on SMS as:

title / message

Is there a way that I can format it in such way that it would instead come through as something like:


I do have Twilio set up and have used it and it works perfectly. I just wanted to get this set up as well as an alternate method of notification. I did try just not using the title and HA barked at me about it, so I had to add it back. And, quite frankly, if I could get the SMTP to format nicely or at least more functionally, it would be just about perfect.

Some mobile providers allow sending email to SMS

Yes, this I know and have implemented. However, I am wanting to know if there is a way to specifically format the message so that I don’t end up with title of message / message type of format, rather I get the format as indicated above.

If you send email from another email client to sms do you have same format (subject/message)?

default message type is plaintext. This has format title/message

text/HTML multi-part message is sent when “image” tag is added
This also adds the “Subject” line you are wanting

from here

I think you may be misunderstanding what I am trying to convey and thus ask if it can be changed. Let’s use the example provided for SMTP in the documentation which I have included below:

    alias: Burglar Alarm
      - service: shell_command.snapshot
      - delay:
            seconds: 1
      - service: notify.NOTIFIER_NAME
            title: 'Intruder alert'
            message: 'Intruder alert at apartment!!'
                    - /home/pi/snapshot1.jpg
                    - /home/pi/snapshot2.jpg

So I set my Title to be “Intruder alert” Then I set the message to be “Intruder alert at apartment!” That will send successfully. However, when it comes through on SMS it will read:

Intruder alert / Intruder alert at apartment!

It does not maintain the carriage returns/line feeds. That is to say, it would not come through as:

Intruder alert
Intruder alert at apartment 

What I am trying to accomplish, well, more specifically, find out if it is even possible to do is to format that message so that it is cleaned up a bit and comes through in a more meaningful way. For example, using the above, have the message display when it shows up as an SMS message as:

Title (or it could be Subject): Intruder Alert!
Message: Intruder Alert at apartment!

I have SMTP to SMS messaging working, that’s not the issue. The thing I am after is whether or not it is possible to format that message any. Or because it is SMS am I just stuck with however it comes through?


Title/Message is plaintext

This will appear when image added. I confirmed by faking image to achieve this by setting image to “/a”

Based on the example code you should get this since image is present
Do the images come through?

Okay, perhaps I misunderstood what you were trying to convey instead. Let me try that out and see what happens.

So I did try that, and it is better as it comes through as an MMS now. Now, using the example above, the message comes through as:

<Subject: Intruder Alert!>
Intruder Alert at apartment!

That’s better, but I think, in the grander scheme of things it would be better to just omit the Title/Subject altogether. I think I took a stab at that before and HA barked at me about it.

Someone created a custom component that allowed specification go recipient per automation instead of competent.

I talked seems broken currently but I may modify this to include MMS be SMS option or something.

I found that MMS message seemed to be slower, so for time sensitive notification (like doorbell ringing message) SMS with weblink was better than MMS with photo.

1 Like