mathewalex806 / Mail

A front-end design for an email client that makes API calls to send and receive emails. Project 3 for CS50’s Web Programming with Python and JavaScript.

Home Page:https://www.youtube.com/watch?v=PaXcn2q4bN8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mail - CS50w

Overview

A front-end design for an email client that makes API calls to send and receive emails.

Specification

This project fulfills the following requirements:

  • Send Mail: When a user submits the email composition form, it actually sends the email.

    • Making a POST request to /emails, passing in values for recipients, subject, and body.
    • Once the email has been sent, the user’s sent mailbox is loaded.
  • Mailbox: When a user visits their Inbox, Sent mailbox, or Archive, the appropriate mailbox is loaded.

    • Making a GET request to /emails/<mailbox> to request the emails for a particular mailbox.
    • When a mailbox is visited, the application will first query the API for the latest emails in that mailbox.
    • When a mailbox is visited, the name of the mailbox will appear at the top of the page.
    • Each email should then be rendered in its own box (e.g. as a <div> with a border) that displays who the email is from, what the subject line is, and the timestamp of the email.
  • View Email: When a user clicks on an email, the user is taken to a view where they see the content of that email.

    • Making a GET request to /emails/<email_id> to request the email.
    • The application shows the email’s sender, recipients, subject, timestamp, and body.
    • Adding an additional div to inbox.html (in addition to emails-view and compose-view) for displaying the email (here, as email-details). Updating code to hide and show the right views when navigation options are clicked.
    • Once the email has been clicked on, the email is marked as read. Sending a PUT request to /emails/<email_id> to update whether an email is read or not.
  • Archive and Unarchive: Allow users to archive and unarchive emails that they have received.

    • When viewing an Inbox email, the user is presented with a button that lets them archive the email. When viewing an Archive email, the user is presented with a button that lets them unarchive the email. This requirement does not apply to emails in the Sent mailbox.
    • Sending a PUT request to /emails/<email_id> to mark an email as archived or unarchived.
    • Once an email has been archived or unarchived, the user’s inbox is loaded.
  • Reply: Allow users to reply to an email.

    • When viewing an email, the user is presented with a “Reply” button that lets them reply to the email.
    • When the user clicks the “Reply” button, they are taken to the email composition form.
    • Pre-filling the composition form with the recipient field set to whoever sent the original email.
    • Pre-filling the subject line. If the original email had a subject line of foo, the new subject line will be Re: foo. (If the subject line already begins with Re: , no need to add it again.)
    • Pre-filling the body of the email with a line like On Jan 1 2020, 12:00 AM foo@example.com wrote: followed by the original text of the email.

    Topics

Built with Python, Django, JavaScript, and HTML/CSS.

About

A front-end design for an email client that makes API calls to send and receive emails. Project 3 for CS50’s Web Programming with Python and JavaScript.

https://www.youtube.com/watch?v=PaXcn2q4bN8


Languages

Language:Python 58.8%Language:JavaScript 25.4%Language:HTML 15.1%Language:CSS 0.6%