if you wish to have your internal network/private ip ( rather than the public one provided by the curl command in ~Putnik 's answer you could use
ip r | grep -i wlp3s0 | grep -i src | cut -d' ' -f9 #note, the wlp3s0 interface name could/will be different on your machine
then, as Putnik rightly answers, pipe that into mail...
ip r | grep -i wlp3s0 | grep -i src | cut -d' ' -f9 | mail -s "$HOSTNAME new ip" email@example.com
next, we need to add this command to your crontab, so
and add to the last line...
0 * * * * <$YOUR_USER_NAME> ip r | grep -i wlp3s0 | grep -i src | cut -d' ' -f9 | mail -s "$HOSTNAME new ip" firstname.lastname@example.org
BONUS ::Cronjobs can fail! Monitor your important cronjob by pasting the following snippet at the end of the crontab entry. Make sure to replace the with your email address and some name for your cronjob.Should your cron job fail or not even start, you will receive an alert email.
&& curl -sm 30 k.wdt.io/<email-address>/<cronjob-name>?c=0_*_*_*_*