SendGrid is an email sending service used to send email through softwares.
This application uses SendGrid to send emails.
You will need the following programmes properly installed on your computer.
To install virtual environment on your system use:
pip install virtualenv
or
pip3 install virtualenv #if using linux(for python 3 and above)
- SendGrid API key
To get the email application to work you would need to create and use an API key for Sendgrid.
git clone https://github.com/ongraphpythondev/sendgrid_email.git
cd sendgrid_email
virtualenv venv
or
virtualenv venv -p python3 #if using linux(for python 3 and above)
venv\Scripts\activate # for windows
or
source venv/bin/activate # for linux
# install required packages for the project to run
pip install -r requirements.txt
In Project directory's sendgrid_email/settings.py file you would need to either change
SENDGRID_API_KEY = os.getenv('SENDGRID_API_KEY')
to
SENDGRID_API_KEY = '<The API key provided by SendGrid>'
or define SENDGRID_API_KEY in environment variables as the key provided by sendgrid.
To run the development server after installation:
# activate the virtual environment
venv\Scripts\activate # for windows
or
source venv/bin/activate # for linux
# run server
python manage.py runserver