So after experimenting with a few different options I've settled on HEmail and it works great.
I installed Synology Mail Server on my NAS and configured it to be an SMTP Relay (this is crazy simple to do) to my MS Outlook account. HEmail then uses it to email notifications to my Gmail account.
I tried using Gmail and Yahoo as SMTP relays but they won't allow it and I didn't bother trying iCloud.
@erktrek Is it possible to add some sort of queuing to your driver or retry function? I'm occasionally finding emails just aren't being sent at all and there's nothing on my Mail Relay to indicate an attempt to send an email was even made.
I know the notifications I'm using work, because they also use push App notifications (from the same Notification rule) which work every time.
So the driver is pretty simplistic - establish a telnet connection and dump what is passed. A thought would be adding some sort of delay or retry and beefing up error trapping.
I have not really messed with the code since I started using Node-RED which has it's own email node that works with everything.
Ah, I think the issue is notifications sent close together. The first one always works, but the 2nd one fails if an email notification is still in progress.
Here is my issue. I have an internal Email server (Postfix) running on a linux box. My email notification all go through the postfix and work great as I have the Postfix box relaying to Gmail using a secure connection. So basically I just need this to send and email to my postfix server with only these fields:
SMTP Server
From Address
Port
This postfix server is at my house and behind a firewall. I use it for all notifications within my network. It only sends. All my apps that I have running or servers only require those 3 fields.
How can I make this work? I tried setting the other fields to false, but it still doesn't send.
This is how you setup postfix to relay to Gmail for those interested.
That's cool thanks for the link. I am doing exactly the same except I run my own mail server (postfix as well!) in a dmz but that will come in handy I think.
Have you looked at @kahn-hubitat's sendmail? He's been actively developing his version so that might be something to consider.
I am using Node-RED for my rules etc - it has built in email support so I can securely send and notify based on HE events.
I'm running a DMZ also. I looked at Kahn's app and it says no local server needed. I'm really looking for something that stays inside and let Postfix securely send the email through Gmail. I really thought this app would work. I think it's close I just don't know code or I'd fix it for my use.
I use sendmail as a relay. And my outgoing email is sent via Gmail - I have a specific Google username just for my Hubitat notification email. I had to decrease account security to get this to work. Specifically, turn on "Less secure app access".