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 provided to the function.
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.sendgrid_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 psusannx_email',
body='This is a test email.\n\nThanks.',
from_email='<your-email>',
recipients=['<recipient-1>', '<recipient-2>']
)
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 abiloty to send emails where the body is html, rather than 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.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for psusannx_email-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba8ad721ddd720c87cd9342156f8149d118074e978edc1e64299033ac31959b |
|
MD5 | 883945a509f2399cabd17fa439e45208 |
|
BLAKE2b-256 | 6824217e7bcd79011855a2318eed21ca14428dd5b61d42fc621d4097ec349983 |