@@ -40,6 +40,7 @@ def _translate_keys(self, **kwargs):
40
40
model ['options' ]['transactional' ] = kwargs .get ('transactional' )
41
41
model ['options' ]['sandbox' ] = kwargs .get ('use_sandbox' )
42
42
model ['options' ]['skip_suppression' ] = kwargs .get ('skip_suppression' )
43
+ model ['options' ]['ip_pool' ] = kwargs .get ('ip_pool' )
43
44
model ['options' ]['inline_css' ] = kwargs .get ('inline_css' )
44
45
45
46
model ['content' ]['use_draft_template' ] = \
@@ -77,6 +78,10 @@ def _translate_keys(self, **kwargs):
77
78
model ['content' ]['attachments' ] = self ._extract_attachments (
78
79
attachments )
79
80
81
+ inline_images = kwargs .get ('inline_images' , [])
82
+ model ['content' ]['inline_images' ] = self ._extract_attachments (
83
+ inline_images )
84
+
80
85
return model
81
86
82
87
def _format_copies (self , recipients , copies ):
@@ -176,6 +181,26 @@ def send(self, **kwargs):
176
181
name='document.pdf',
177
182
filename='/full/path/to/document.pdf'
178
183
)
184
+ :param inline_images: List of dicts. For example:
185
+
186
+ .. code-block:: python
187
+
188
+ dict(
189
+ type='image/png',
190
+ name='imageCID',
191
+ data='base64 encoded string'
192
+ )
193
+
194
+ Replace `data` with `filename` if you want the library to perform
195
+ the base64 conversion. For example:
196
+
197
+ .. code-block:: python
198
+
199
+ dict(
200
+ type='image/png',
201
+ name='imageCID',
202
+ filename='/full/path/to/image.png'
203
+ )
179
204
180
205
:param str start_time: Delay generation of messages until this
181
206
datetime. Format YYYY-MM-DDTHH:MM:SS+-HH:MM. Example:
@@ -192,6 +217,8 @@ def send(self, **kwargs):
192
217
:param bool skip_suppression: Whether or not to ignore customer
193
218
suppression rules, for this transmission only. Only applicable if
194
219
your configuration supports this parameter. (SparkPost Elite only)
220
+ :param str ip_pool: The name of a dedicated IP pool associated with
221
+ your account
195
222
:param bool inline_css: Whether or not to perform CSS inlining
196
223
:param dict custom_headers: Used to set any headers associated with
197
224
transmission
0 commit comments