Hey everyone, I wanted to share a solution I found for setting up email alerts using an SMTP relay. I recently purchased a Zooz ZSE42 water leak sensor, and getting it to send email notifications was a bit of a challenge for me. Here’s how I made it work!
The Challenge
Most ISPs now block Port 25 for unencrypted email, so sending emails directly from my Hubitat wasn’t going to work. I needed a way to encrypt the emails before they left my network. After some research, I discovered that using an SMTP relay would solve the problem. The best part? I already had a Synology NAS that could handle this!
My Solution
1. Setting Up the Synology NAS
First, I installed the Synology Mail Server package. Here’s what I did:
- Install the Mail Server: Go to the Package Center and install the ‘Synology Mail Server’.
- Configure SMTP: In the Mail Server settings, I enabled SMTP and set it to use local users. I also checked the option to ignore authorization for LAN connections.
- SMTP Relay Configuration: I enabled the SMTP relay and entered my email provider’s SMTP address. I made sure to include my email credentials for authentication.
2. Setting Up Hubitat
Next, I needed to configure Hubitat to send emails through the Synology relay:
- Install the SendMail Driver: I used the LGK SendMail V2 driver from GitHub. It was straightforward to install by copying the code into Hubitat’s driver section.
- Create an Emailer Device: I created a new virtual device in Hubitat using the LGK SendMail V2 driver. I configured it with my Synology NAS’s local IP address, port 25, and my email details.
3. Testing the Setup
To test everything, I used a button to trigger an email:
- Install the Notifications App: I installed the Notifications app in Hubitat and set up a test notification tied to the button press.
- Test the Email: Pressing the button sent an email through the relay, and it worked perfectly!
Final Thoughts
This setup has been a lifesaver for me, especially with the water leak sensor. It’s great to have peace of mind knowing I’ll get an alert if there’s any water detected. If anyone has questions or needs help setting this up, feel free to ask!
Happy automating! ![]()