Skip to content

geeksLabTech/email-client

Repository files navigation

contributions welcome Hits Build Status Build Status License Build Status Build Status deepcode

Email Client

python email client for any email server that supports imap and smtp,
using a telegram bot as interface

Installation and Deployment

Manual Install and Deploy

First of all make sure that your system is up to Date

(Ubuntu) sudo apt-get update && sudo apt-get upgrade

(Arch) sudo pacman -Syu

Install Mongodb for users handle (Ubuntu) sudo apt-get install mongodb

(Arch) sudo pacman -S mongodb

Set MongoDB daemon to run at startup:

sudo systemctl enable mongod sudo systemctl start mongod

Then make sure that python3 is installed and in the latest version (3.8 at the time of writting) (Ubuntu) sudo apt-get install python3

(Arch) sudo pacman -S python3

Now install pip (Ubuntu) python3 -m pip install --upgrade pip

And then install the requirements

pip install -r requirements.txt

Now you are Ready to Deploy

Email Servers Configuration

Finally to set up the bot and the server run:

pyhton3 main.py setup_bot

now you would be asked to input the bot token, name and url

pyhton3 main.py setup_email

now you would be asked to input the email imap host and port as well as the smtp host and port now you are ready to use the service

Generate encryption key

Generate encryption key for the database, its very important that you keep this, if this key gets lost you wont be able to decrypt the data
pyhton3 main.py setup_key

Usage

To check your inbox:

python3 main.py recieve your.email@estudiantes.matcom.uh.cu yourpassword


to send an email:

python3 main.py send your.email@estudiantes.matcom.uh.cu yourpassword reciever@example.com subject body


to get the help type:

python3 main.py


and for a specific command help type:

python3 main.py {command} --help

Telegram Bot

You can access our telegram bot at @experimental_email_bot (temporary name) on telegram

Commands

Register

in order to use the bot you need to register on the db, to do it, sent the bot the following info:
/register <email> <password> this will register email and password encripted on the db

Recieve

to recieve unread emails just type:
/recieve

Send

to send an email type:
/send <reciever email> <subject> <body>

Logout

Loguot and remove your data from the server /logout