Skip to content

Commit 037cec1

Browse files
author
Rich Leland
committed
Update docs to for cc/bcc
1 parent 31b04b7 commit 037cec1

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

docs/resources/transmissions.rst

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,28 @@ Here at SparkPost, our messages are known as transmissions. Let's use the underl
2727
Send a transmission
2828
-------------------
2929

30-
There are several ways to send a transmission:
30+
Using inline templates and/or recipients
31+
****************************************
3132

32-
* Using inline templates and/or recipients
33-
* Using a stored template
34-
* Using a stored recipient list
33+
.. code-block:: python
3534
35+
from sparkpost import SparkPost
3636
37-
Using inline templates and/or recipients
38-
****************************************
37+
sp = SparkPost()
38+
39+
sp.transmissions.send(
40+
recipients=['[email protected]'],
41+
text="Hello world",
42+
html='<p>Hello world</p>',
43+
from_email='[email protected]',
44+
subject='Hello from python-sparkpost',
45+
track_opens=True,
46+
track_clicks=True
47+
)
48+
49+
50+
Including cc, bcc
51+
*****************
3952

4053
.. code-block:: python
4154
@@ -45,6 +58,8 @@ Using inline templates and/or recipients
4558
4659
sp.transmissions.send(
4760
recipients=['[email protected]'],
61+
62+
4863
text="Hello world",
4964
html='<p>Hello world</p>',
5065
from_email='[email protected]',

sparkpost/transmissions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ def send(self, **kwargs):
122122
"""
123123
Send a transmission based on the supplied parameters
124124
125-
:param list|dict recipients: If list it is an array of email addresses,
125+
:param list|dict recipients: If list it is an list of email addresses,
126126
if dict ``{'address': {'name': 'Name', 'email': 'me' }}``
127127
:param str recipient_list: ID of recipient list, if set recipients
128128
above will be ignored
129+
:param cc: List of email addresses to send carbon copy to
130+
:param bcc: List of email addresses to send blind carbon copy to
129131
:param str template: ID of template. If set HTML or text will not be
130132
used
131133
:param bool use_draft_template: Default to False. Set to true if you

0 commit comments

Comments
 (0)