Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dericf/sendgrid-examples

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sendgrid Python Examples

Check out the Blog Post

Set up your SendGrid account

  1. Create a sendgrid account
  2. Make sure you go through all the steps to set up a verified sender
  3. Create a restricted API key and enable the needed permissions
  4. Create an unsubscribe group
  5. Create a dynamic template

Running the examples locally

  1. Clone the repository
  2. Create a .env file with the following variables
SEND_GRID_API_KEY=<YOUR API KEY HERE>
FROM_EMAIL=<YOUR FROM EMAIL HERE>
TO_EMAIL=<YOUR TO EMAIL HERE>
UNSUBSCRIBE_GROUP_ID=<YOUR GROUP ID HERE>
DYNAMIC_TEMPLATE_ID=<YOUR DYNAMIC TEMPLATE ID HERE>
  1. Create a virtual environment with venv: python3 -m venv venv
  2. Activate the virtual environment: source ./venv/bin/activate
  3. Install packages pip install -r requirements.txt
  4. Run the desired example (e.g. python examples-python/send-basic.py)

About

Simple examples sending emails with SendGrid and python.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.