To set the WiFi follow the step by click here.
Step 1: Install require filesTo install require file execute following commands.
sudo apt-get install python-dev
sudo apt-get install ssmtp
sudo apt-get install mailutils
Step 2: Code the OdinubFirst we have to go to the specific location wich is /home/Debian for that execute this command.
cd /home/debian
Now we have to make a python script so for that execute the following command.
nano mail.py
You will get screen in that write the code given below.
Now, after write the code to save the code press Ctrl+x and then press Y.
Step 3: Run the codeNow for run the code execute the following command.
python /home/Debian/mail.py
You will see bellow message if the mail sent.
And you will get the mail with image
For the same project you can send any type of file from the mail just you have to edit file name and path of file accordingly.
Comments
Please log in or sign up to comment.