File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,16 @@ Set File Attachments
130130 message.add_attachment_stream(' filename' , ' somerandomcontentyouwant' )
131131 # strings, unicode, or BytesIO streams
132132
133+ Set Content ID's
134+ ~~~~~~~~~~~~~~~~~~~~
135+
136+ .. code :: python
137+
138+ message = sendgrid.Mail()
139+ message.add_attachment(' image.png' , open (' ./image.png' , ' rb' ))
140+ message.add_content_id(' image.png' , ' ID_IN_HTML' )
141+ message.set_html(' <html><body>TEXT BEFORE IMAGE<img src="cid:ID_IN_HTML"></img>AFTER IMAGE</body></html>' )
142+
133143 SendGrid's `X-SMTPAPI `_
134144-----------------------
135145
@@ -178,10 +188,6 @@ There are implementations for setter methods too.
178188 message = sendgrid.Mail()
179189 message.add_filter(" filter" , " setting" , " value" )
180190
181- TODO:
182- ~~~~~
183-
184- - Add support for CID
185191
186192 Tests
187193~~~~~
You can’t perform that action at this time.
0 commit comments