@@ -157,32 +157,35 @@ def send(self, **kwargs):
157
157
"""
158
158
Send a transmission based on the supplied parameters
159
159
160
- :param list|dict recipients: If list it is an list of email addresses,
161
- if dict ``{'address': {'name': 'Name ', 'email': 'me ' }}``
162
- :param str recipient_list: ID of recipient list, if set recipients
163
- above will be ignored
160
+ :param list|dict recipients: List of email addresses, or a dict:
161
+ ``{'address': {'name': 'Kyla ', 'email': '[email protected] ' }}``
162
+ :param str recipient_list: ID of recipient list. If this is set,
163
+ the `recipients` param will be ignored
164
164
:param cc: List of email addresses to send carbon copy to
165
165
:param bcc: List of email addresses to send blind carbon copy to
166
- :param str template: ID of template. If set HTML or text will not be
167
- used
168
- :param bool use_draft_template: Default to False. Set to true if you
166
+ :param str template: ID of template to be used. Setting a template
167
+ overrides the HTML and text params
168
+ :param bool use_draft_template: Defaults to False. Set to true if you
169
169
want to send a template that is a draft
170
170
:param str html: HTML part of transmission
171
171
:param str text: Text part of transmission
172
172
:param str subject: Subject of transmission
173
173
:param str from_email: Email that the transmission comes from. The
174
- domain must be a verified sending domain to your account or
175
- the transmission will fail. You can pass a from email or both
174
+ domain must be a verified sending domain belonging to your account
175
+ or the transmission will fail. You can pass a from email or both
176
176
from name and from email - `[email protected] ` or
177
177
`Test Email <[email protected] >` will both work.
178
178
:param str reply_to: Reply to of transmission
179
+ :param str return_path: Email address to use for envelope FROM. The
180
+ domain part of the return_path address must be a
181
+ CNAME-verified sending domain.
179
182
:param str description: Description of transmission
180
183
:param str campaign: Campaign of transmission
181
184
:param dict metadata: Any data you want to send along with
182
185
transmission, used in WebHooks
183
186
:param dict substitution_data: Corresponds to substitutions in
184
187
html/text content. See `substitutions reference
185
- <https://developers.sparkpost.com/api/substitutions-reference.html >`_.
188
+ <https://developers.sparkpost.com/api/substitutions-reference>`_.
186
189
:param attachments: List of dicts. For example:
187
190
188
191
.. code-block:: python
@@ -238,15 +241,16 @@ def send(self, **kwargs):
238
241
non-transactional for unsubscribe and suppression purposes
239
242
:param bool skip_suppression: Whether or not to ignore customer
240
243
suppression rules, for this transmission only. Only applicable if
241
- your configuration supports this parameter. (SparkPost Elite only)
242
- :param str ip_pool: The name of a dedicated IP pool associated with
244
+ your configuration supports this parameter. (Enterprise only)
245
+ :param str ip_pool: The ID of an IP pool associated with
243
246
your account
244
247
:param bool inline_css: Whether or not to perform CSS inlining
245
248
:param dict custom_headers: Used to set any headers associated with
246
- transmission
249
+ transmission. See `header notes
250
+ <https://developers.sparkpost.com/api/transmissions.html#header-header-notes>`_
247
251
248
- :returns: a ``dict`` with the ID and number of accepted and rejected
249
- recipients
252
+ :returns: a ``dict`` with the transmission ID and number of accepted
253
+ and rejected recipients
250
254
:raises: :exc:`SparkPostAPIException` if transmission cannot be sent
251
255
"""
252
256
@@ -266,24 +270,23 @@ def get(self, transmission_id):
266
270
267
271
:param str transmission_id: ID of the transmission you want to retrieve
268
272
269
- :returns: the requested transmission if found
273
+ :returns: the requested transmission, if found
270
274
:raises: :exc:`SparkPostAPIException` if transmission is not found
271
275
"""
272
276
results = self ._fetch_get (transmission_id )
273
277
return results ['transmission' ]
274
278
275
279
def list (self , ** kwargs ):
276
280
"""
277
- Get a list of your transmissions
281
+ Get a list of your transmissions. This method is deprecated.
278
282
279
283
:param campaign_id: ID of the campaign used by the transmissions
280
284
:param template_id: ID of the template used by the transmissions
281
285
282
286
:returns: list of transmissions
283
287
:raises: :exc:`SparkPostAPIException` if API call fails
284
288
"""
285
- warn_msg = 'This endpoint is deprecated. For details, '
286
- 'check https://sparkpo.st/5qcj4.'
289
+ warn_msg = 'This method is deprecated.'
287
290
288
291
warnings .warn (warn_msg , DeprecationWarning )
289
292
return self .request ('GET' , self .uri , params = kwargs )
0 commit comments