A project from https://cs50.harvard.edu/web/2020/projects/3/mail/
Please ensure that Python is installed to run this code
Steps to run the code:
-
Download the ZIP file and open the folder in your desired IDE, preferable VS Code.
-
Create a virtual environment using the command
py -3 -m venv .venv
for Windows. (*Make sure you are in the correct working directory which is the folder created at Step 1) -
Activate the virtual environment using the command
.venv\scripts\activate
. (*Make sure you are currently in the correct working directory which is the folder created at Step 1) -
Update pip in the virtual environment using the command
python -m pip install --upgrade pip
. -
Install Django in the virtual environment using the command
python -m pip install django
. -
Run the command
python manage.py makemigrations mail
to make migrations for the mail app. -
Run the command
python manage.py migrate
to apply migrations to your database. -
After making and applying migrations for the project, run
python manage.py runserver
to start the web server. -
Open the web server in your browser, and use the “Register” link to register for a new account. The emails you’ll be sending and receiving in this project will be entirely stored in your database (they won’t actually be sent to real email servers), so you’re welcome to choose any email address (e.g. [email protected]) and password you’d like for this project: credentials need not be valid credentials for actual email addresses.