Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 1.37 KB

README.md

File metadata and controls

42 lines (37 loc) · 1.37 KB

IP Mail

Introduction

A simple C++ program that can be run on boot or on network change to send local ip address of the system to a pre-defined email ID, eliminating the need to connect an external monitor, find the ip and then ssh into the device.

Setup

  1. cURL, Cmake and a C++ compiler is required for compiling the code
sudo apt install curl cmake make g++ -y
  1. Modify line 3, 4 and/or 5 of config.h as per your requirements. Note that instead of putting your gmail account password, insert an app password instead. Read more about it here. Entering your gmail password will throw an error.
  2. Navigate to the project directory and run the following commands to build:
mkdir build && cd build
cmake ..
make
  1. You'll now see an executable named ip_mail that can now be run as a startup application.

Example

After running the commands, you will see the following output:

demo.png

Directory structure

.
├── CMakeLists.txt
├── include
│   └── ip_mail
│       ├── config.h
│       ├── email.h
│       ├── network.h
│       └── time.h
├── LICENSE
├── README.md
└── src
    ├── email.cpp
    ├── main.cpp
    ├── network.cpp
    └── time.cpp