Skip to content

The backend for the connection form on my homepage. My homepage sends the connection message to my server, and my server sends an email to me.

Notifications You must be signed in to change notification settings

sirrenberg/email-sending-sever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Small server to send Emails based on a POST request

This is a small server that listens for POST requests on the /contact endpoint. The server will send an email to the recipient specified in the env file.

Setup

  1. Clone the repository
  2. Create a virtuel environment.
  3. Install the dependencies with pip install -r requirements.txt
  4. env.json file should be created with the following content:
{
    "PW": "your_password",
    "HOST": "the smtp hostname for your email provider",
    "PORT": 587,
    "FROM_EMAIL": "[email protected]",
    "TO_EMAIL": ["[email protected]"]
}
  1. Run the server with uvicorn main:app --host 0.0.0.0 --port 8080

About

The backend for the connection form on my homepage. My homepage sends the connection message to my server, and my server sends an email to me.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages