Skip to content
 
 

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMTPAPI for Python

This module will let you build SendGrid's SMTP API headers with simplicity.

Installing

pip install smtpapi

Examples

Create headers

from smtpapi import SMTPAPIHeader

header = SMTPAPIHeader()
header.add_to('[email protected]')
header.set_tos(['[email protected]'])
header.add_substitution('key', 'value')
header.set_substitutions({'key': ['value1', 'value2']})
header.add_unique_arg('key', 'value')
header.set_unique_args({'key':'value'})
header.add_category('category')
header.set_categories(['category1', 'category2'])
header.add_section('key', 'section')
header.set_sections({'key1':'section1', 'key2':'section2'})
header.add_filter('filter', 'setting', 'value')
header.set_asm_group_id(value)
header.set_ip_pool("testPool")
header.add_send_each_at(unix_timestamp)
header.set_send_each_at([])
header.set_send_at(unix_timestamp)

Get Headers

header.json_string()

Deploying

  • Confirm tests pass
  • Bump the version in setup.py
  • Update CHANGELOG.md
  • Confirm tests pass
  • Commit Version bump vX.X.X
  • python setup.py sdist bdist_wininst upload
  • Push changes to GitHub
  • Release tag on GitHub vX.X.X

MIT

About

Build SendGrid X-SMTPAPI headers in python

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages