Contents

What does it do?

This code will extract the ip address of your Pi and then send an email containing the ip to the specified email address. This is inspired by the need to access the Pi via SSH or other network protocols without a monitor and moving from network to network. This assumes a Gmail SMTP server. You may need to alter a bit for other servers (beyond scope here)

What do you need?

A working, and network enabled Raspberry Pi

What skill level is required?

Medium Level. You should be comfortable navigating a linux system and be comfortable using sudo (if you want to use this script, odds are you are quite comfortable at the command prompt).

Overview of this guide

You need to

Create a python script and store it in a Directory

Make python script executable

Edit /boot/boot.rc

Let's Do It

Create the python script

Copy and paste the following code into a text editor (I'm a nano man myself)