Sendmail - Send email and text notifications, (notification device) no local server needed

I've been on .141 since release without issues - .142 broke almost everything tho. :man_facepalming:

No kinks here! Very nice work sir! :sunglasses:

1 Like

Dayum! :slight_smile: Wow... 2.2.4.143 and updated Sedmail with queuing! I should spend the afternoon at my mom's house more often, great things happen whilst we whiled the time away.

Thanks very much for the update, @kahn-hubitat...I drove home today and opened my garage door and my garage door opened text appeared so quickly that I was surprised by it. Excellent work.

Darn, I forgot, shout-out to @erktrek (big-time troublemaker) as well. :slight_smile:

3 Likes

Good day all.

I'm working on attempting to get this going (lots of caveats, yes). I'm struggling with what to enter for what.

I'm wanting to send emails using my gmail account, but not sure what / how to enter the preferences on the virtual device.

I'm using the following:
Email server: smtp.gmail.com
Port: 587
From: <my gmail account with suffix "@gmail.com">
To: <this is my cell phone using "phone@txt.att.net">
Hostname: smtp.gmail.com
Enable logging: checked
Use authentication on the server: checked
Username: <my gmail account with suffix "@gmail.com">
Password: my gmail account password

When I try a test in "Device Notifications", I see "send failed" as the last command. In the logs, it ends with "Got bad response for auth = 530"

Any ideas what I'm doing wrong?

You can't go directly to Google because of a system limitation preventing the use of authentication. Instead you have to use your ISP's email.

2 Likes

@Noob_using_hubitat

@erktrek has explained why sending email to gmail fails using this integration. I just want to mention that there is another email integration - written by @erktrek that will work for your use case.

@erktrek's integration does require an external device running sendmail (or a sendmail-compatible mailer). Most people use a Raspberry Pi; however, anything running Linux/Unix and capable of running sendmail will work just fine.

3 Likes

The other option is for Synology NAS owners, you can install the mail server and run it as a relay. Outlook 365 allows this and you can send email to your gmail account via the outlook servers.

3 Likes

new version 2.5.1 slight adjustments*

v 2.5.1 mine got stuck in weird state and kept re-running with failure.. added an unschedule to fix it in certain cases and reset states. Also removed a function no longer called.
Also reset state variable when it finds queue empty.

2 Likes

So good...thanks for the additional updates.

Son got a text today from HE about his laundry. I actually got a "Cool" from him. I owe you $1,000,000,000. :slight_smile:

I hope this doesn't break the Piano Light. :wink:

1 Like

Lived with that for years w/ T-Mobile.

Only recently did such msgs start stacking under the same SMS sender ID vs an ever changing #

I don't believe it started as a result of any change on my end. I assumed this is a handling & IDing thing on the provider's end?

Does anyone know how to set this up? This has NO instructions on how to setup or use. It just shows up as a Driver Code. Any Step by Step instructions anywhere? Sorry I'm new to HE just use to here is the code, how to install it, and how to use it. I'm a to the point kind of person. lol

For the set-up, see the (*) clause I have here:

Once this is setup, the device you added will show up as an option for anything (e.g., app, etc) that wants to send a notification.

I got it working.

  1. Install Device Code
  2. Setup new Device - Name Device. - Scroll to bottom of Devices List and select sendmail.
  3. Put in your server information - Test it
  4. Save.
  5. Create a notification and select what you called it in Step 2
3 Likes

You'll find this approach (install driver > create device using driver > use that device in apps to create automations) is a really common approach. Once you do it (as you have here) it's easy from them on. But at first there is that moment of "Wait, what do I do??" :slight_smile:

Hope you like this driver, been perfect for me, the simplest way I've found to get text notifications enabled.

@kahn-hubitat I'm not sure if this in-frequent issue is caused by SendMail or my mail relay server, but occasionally I get a corrupted email that looks like this:

Screen Shot 2020-12-10 at 9.27.04 am

any ideas?

its gota be your server or relay. the app could possibly send two emails but never would duplicate that info. there is no code to retry sending a component of a message if it fails.. it will just log an error.

1 Like

Yeah, that was what I was thinking too. very odd.

could be a network issue. packets at the net level can be resent i believe if a ack is not recvd.

what does the message header look like.. is it normal?

The header is completely normal - it's just the subject and content that is screwed up.

I didn't have logging on for that email but I can see it in my originating mailbox sent items too; Gmail received exactly what was sent.

No, that would not cause this. If/when that happens, TCP would not cause the byte stream to get duplicated data. It is a reliable transmission path.

This looks more like somehow you had 2 email connections open at the same time and they both output to the same socket.