Is there any way we can find about all the connected client details(IP & name) from another client? I know there is a topic \"$SYS/broker/clients/active\" which gives th
like Knolleary already stated this is implementation specific and not provided by MQTT itself.
One solution could be to use the HiveMQ MQTT broker. It has a Plugin SDK, which allows you to do such customization over callbacks, meaning every time a client connects, disconnects, send a message, subscribes to a message you can execute custom code, like in your case sending an email. When writing your custom code you can access all information about the client, which has invoked the callback. So it would be easy to implement your behavior. The only thing is where do you store the email address? Is it the username?
For more information on writing custom HiveMQ plugins see the getting started guide and the example plugin on GitHub
(Disclosure: I'm one of the HiveMQ developers)
Cheers, Chris