startup_mailer.py

#on run this program sends an email to the
#given address containg the IP addres
#in the meassage body and subject line.
#thiscode is based on that found here:
#http://cagewebdev.com/index.php/raspberry-pi-sending-emails-on-boot/
#http://elinux.org/RPi_Email_IP_On_Boot_Debian

#primarly utility is to sen the IP address at boot so that
# a SSH connection can be established on a new network

#To run the code at start up,  in the Rasbian distro
# place a call for execution in etc/rc.local directory
#the code for the rc.local fime is:
#sleep 60  #to allow time for the IP addess to be established very important in $
# _IP=$(hostname -I) || true
# if [ "$_IP" ]; then
#   printf "My IP address is %s\n" "$_IP"
#   python /home/pi/Code/startup_mailer.py
# fi