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

Hi folks, I hate to jump into an active conversation, and also hate piling onto such a long thread. However, I'm having an issue and hoping someone might be able to offer suggestions.

I just got a Hubitat C-7, and am trying to set it up to send out email notifications, from this device through an SMTP server I control. I tried installing the sendmail driver and creating a device, with advice from @aaiyar . However, I'm getting some errors, and am not sure the cause or what to try next. Here is a log snippet:


(URLs/URIs masked)

It seems that on the SMTP server, I'm seeing sendmail connect via telnet, then disconnect without actually trying to send anything. I'm seeing no server-side errors. On Hubitat, I'm seeing HTTP 220 and 421 codes, and what looks like maybe a syntax error. I'm also wondering if it might be misinterpreting the server's MOTD/welcome message as being something else entirely.

I have tried many variations for configuration, but had no success so far (although I've found new ways to break it). One remaining question: the auth creds I enter for the SMTP server should be base64 encoded by me, right? (It's not saying that sendmail will do it, right?)

Any suggestions?

(I started this discussion in this other thread, and was directed to come here.)

I need to see the initial server response that was blacked out.. but in general responses need to be number codes and it look like your server is not sending a number response code back.

Also looks like you used the wrong command from the device panel to test. This does not implment sendmessage but notification message

It has been a long time but new version 4.01 now on github.

Someone posted a thread on github where they found a bug where i misspelled lastCommand.. When fixed it brought to light some missing 250 checks..

1 Like

I can send you the original via PM if that would be helpful, although perhaps that isn't relevant at this point.

Ah yes, you are quite right. I was in the "throw everything at the wall and see what sticks" phase of troubleshooting (also known as "sheer desperation bordering on insanity"). I seem to have been looking at the wrong log snippet. I ran it again, two more times using the "Send Msg" button. Each time posted just this single error to the log. Here are both occurrences:

Want me to try updating the driver, and see if that helps?

I just tried out the driver using my TWC Email. Example: XXXXX@woh.rr.com using my userid and password. It worked great. No other parameter changes were required. Thanks.

Ron

Ok, I replaced the driver code, and am still getting this error.

@kahn-hubitat, Thank you vey much. If you supply an account I would send you a donation to buy you a 6 pack of your favorite drink.

I am newer to Hubitat, coming from ST where SMS was built in for US users. My use case was to notify others without installing and setting up an app they don't need as well as setting up my phone so these notifications can bypass my cellphone quiet time and silent settings. Thanks.

If it hasn't been mentioned already it would be nice to be able to enter multiple To addresses separated by a comma or something. I'm using this where I work along with Google's SMTP Relay. I'm going to see if I can't modify the code to accommodate multiple addresses.

Actually, I just realized the better way is simply to create multiple devices for each recipient. That way they can be individual selected when setting up the notifications. Only downside is having to set the email server for each.

1 Like

That's what I prefer, separate devices/person, so I can control who gets what notifications at the individual level. Takes a few more seconds to set up, but better use experience.

1 Like

Hi. My notifications have mostly failed in the last several days.
I installed the latest update, but no joy.
It was working so great too.
Here is one screen copy of a log when I tried to send a message from the device screen:

Odd...I didn't notice until I saw your post, but I just checked and saw that the last notification I received was on Tuesday.

I tested a door opening notification just now and it looks like mine aren't working either.

I'm on Verizon using Spectrum email address>phone text number for the notifications.

I tried substituting my email address instead of text, and it also failed with the same message.

Pushover still working fine.

I'm also using Spectrum email, ATT for mobile.

This is all I get in Logs from Sendmail when starting an action that sends a text.

However, sending from the device page I get this error:

I sent a text to my phone via email, so that works.

Just confirming - using the same email account that you use w/Sendmail?

Yes. Here's a sample of what I get when I close my water valve:

1 Like

Just tried and mine worked.

Verizon using Spectrum email address>phone text number.

1 Like

Thanks for checking.

Weird...did you send a message from the device page, or activate one of your notifications? Just curious.

I still get nothing in logs but this, after enabling logging and doing a Send Message from teh device page:

I haven't updated or changed anything w/Sendmail in weeks.

@kahn-hubitat - save us, Obie-Kahn, you're our only hope. :wink:

try Device notification.

This is the problem when something just works for a long time, and then it doesn't, coupled with a geriatric brain. It hangs up, mostly. Sometimes something gets through.