This sends an email to the address specified with the environment variables of the session on every session creation (every login, not counting sudo.)
Env variables for SSH include the public key, the IP address, and whatever other authentication was done.