Skip to content

amssdias/sending-emails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Badge Python Badge

Send Emails

A simple app where a user can send emails to his friends. Easy to use.

Built with

Django Badge

🔨 Getting started

Pre requisites

Installation

Pipfile and Pipfile.Lock

Inside the Pipfile there's all the modules name needed for the project.

  1. Download Pipenv through the terminal window (make sure you have Python installed):

    pip install pipenv
  2. After installing pipenv all you have to do is to download the files and in the terminal window, go to the folder with these files and run:

    pipenv install

    This will create a virtual environment with all the modules needed.

  3. We must have this virtual environment to run our program, through the terminal window:

    pipenv shell # To run the virtual environment
    exit         # To close the virtual environment

If any doubts here's a link to some more explanations: Pipenv

Setting up Gmail for Django Mail API

We need to make some changes in our Gmail account to send an Email. Visit this link with your account signed in:

Gmail Account Settings

The link contains a specific setting that allows access via Django mail API. Since our web application is not a google registered service, it is a less secured app. Therefore, we allow less secured apps to our settings.

Less secure app access option will be present. Turn on the access.

Note:

If you are just testing, then you can temporarily do this setting.

📧 Send emails

On your terminal window, go to the folder with the Pip files and type:

pipenv shell

Then change to the folder with manage.py and type:

python manage.py runserver

Paste this link on your browser: http://127.0.0.1:8000/emails/send_email