Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tutorials/embed/image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You may also pass the image as bytes:
data = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
data_as_bytes = base64.b64decode(data_as_base64)

gmail.send(
email.send(
subject='An image',
receivers=['first.last@example.com'],
html="""
Expand Down Expand Up @@ -122,7 +122,7 @@ You may also include images using the dict format:
data = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
data_as_bytes = base64.b64decode(data_as_base64)

gmail.send(
email.send(
subject='An image',
receivers=['first.last@example.com'],
html="""
Expand All @@ -131,7 +131,7 @@ You may also include images using the dict format:
""",
body_images={
'myimage': {
'myimage': data_as_bytes,
'content': data_as_bytes,
'subtype': 'png'
}
}
Expand Down