File: transmission_stored_list.py

package info (click to toggle)
python-sparkpost 1.3.10-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 512 kB
  • sloc: python: 2,528; makefile: 31; sh: 10
file content (24 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from sparkpost import SparkPost

sp = SparkPost()

response = sp.transmissions.send(
    recipient_list='my_list',
    html='<p>Hello world {{name}}</p>',
    text='Hello world {{name}}',
    from_email='test@sparkpostbox.com',
    subject='Example Script',
    description='contrived example',
    custom_headers={
        'X-CUSTOM-HEADER': 'foo bar'
    },
    campaign='sdk example',
    metadata={
        'key': 'value',
        'arbitrary': 'values'
    },
    substitution_data={
        'name': 'Example User'
    },
    reply_to='no-reply@sparkpostmail.com'
)