<filename>examples/transmissions/schedule_transmission.py
from sparkpost import SparkPost

sp = SparkPost()

response = sp.transmissions.send(
    recipients=[
        '<EMAIL>',
        '<EMAIL>',
        {
            'address': {
                'email': '<EMAIL>',
                'name': '<NAME>'
            }
        }
    ],
    html='<p>Hello world {{name}}</p>',
    text='Hello world {{name}}',
    from_email='<EMAIL>',
    subject='Example Script',
    description='contrived example',
    custom_headers={
        'X-CUSTOM-HEADER': 'foo bar'
    },
    track_opens=True,
    track_clicks=True,
    start_time='2015-11-06T09:10:00-05:00',
    campaign='python-sparkpost example',
    metadata={
        'key': 'value',
        'arbitrary': 'values'
    },
    substitution_data={
        'name': 'Example User'
    }
)

print(response)

<filename>examples/transmissions/schedule_transmission.py
from sparkpost import SparkPost

sp = SparkPost()

response = sp.transmissions.send(
    recipients=[
        '<EMAIL>',
        '<EMAIL>',
        {
            'address': {
                'email': '<EMAIL>',
                'name': '<NAME>'
            }
        }
    ],
    html='<p>Hello world {{name}}</p>',
    text='Hello world {{name}}',
    from_email='<EMAIL>',
    subject='Example Script',
    description='contrived example',
    custom_headers={
        'X-CUSTOM-HEADER': 'foo bar'
    },
    track_opens=True,
    track_clicks=True,
    start_time='2015-11-06T09:10:00-05:00',
    campaign='python-sparkpost example',
    metadata={
        'key': 'value',
        'arbitrary': 'values'
    },
    substitution_data={
        'name': 'Example User'
    }
)

print(response)
