Skip to main content

A package with a function for sending emails easily using sendgrid.

Project description

psusannx_email

A package that allows emails to be sent through a python function using Sendgrid, provided a valid Sendgrid API Key is passed as an argument to the function (sendgrid_api_key).

The docs for using Sendgrid with python can be found here.

This package was created to be used as a subpackage in a wider project - PSUSANNX.

Package Functions

  • send_email()

Installation

pip install psusannx-email

Usage

# Import the function from the package
from psusannx_email import send_email

# Get some info about the function
help(send_email) 

Now use the function to send an email.

# Send a test email from your own personal email (once you have a sendgrid api key)
send_email(
    subject="Test email using the psusannx_email package", 
    body="This is a test email.\n\nThanks.",
    from_email="<your-email>",
    recipients=["<recipient-1>", "<recipient-2>"],
    sendgrid_api_key="<verified-sendgrid-api-key>"
)

Notes

  • The package is quite restricted in what it can do, but it only needs to do things that are required by the parent project so there won't be much development.
  • A new feature that will be added is the ability to send emails where the body is html, rather than just plain text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psusannx_email-0.1.4.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

psusannx_email-0.1.4-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page