???
https://docs.openhab.org/addons/actions/mail/readme.html
rule "Test mail message"
when
// some rule trigger
then
sendMail("address@domain.com", "This is an alert from openHAB", "The body of the email")
end
Phone detection is tricky. The Network binding is only part of the approach. Some use iPhone Presence Detection with hping3 and ARP or even better the arping capability of the Network Binding which can wake up an asleep phone and get a response back even when the phone is in a deep sleep. Others use BT detection or GPS.
For alerts, I think that most people use the openHAB Cloud Connector with myopenhab.org and the phone app. Most of us use myopenhab.org to access our OH remotely anyway so it is pretty natural to use it for alerting.