Skip to content

modulexcite/smtpapi-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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@email.com')
header.set_tos(['email@email.com'])
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

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%