Skip to content

Commit 1be284c

Browse files
authored
Fix transactional example to use _from rather than from (#103)
1 parent 2ec3e97 commit 1be284c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ To use the [Transactional API](https://customer.io/docs/transactional-api), inst
193193
## Email
194194

195195
SendEmailRequest requires:
196-
* `transactional_message_id`: the ID of the transactional message you want to send, or the `body`, `from`, and `subject` of a new message.
196+
* `transactional_message_id`: the ID of the transactional message you want to send, or the `body`, `_from`, and `subject` of a new message.
197197
* `to`: the email address of your recipients
198198
* an `identifiers` object containing the `id` of your recipient. If the `id` does not exist, Customer.io will create it.
199199
* a `message_data` object containing properties that you want reference in your message using Liquid.
@@ -207,6 +207,7 @@ client = APIClient("your API key", region=Regions.US)
207207

208208
request = SendEmailRequest(
209209
to="person@example.com",
210+
_from="override.sender@example.com",
210211
transactional_message_id="3",
211212
message_data={
212213
"name": "person",
@@ -222,7 +223,7 @@ request = SendEmailRequest(
222223
}
223224
)
224225

225-
with open("path to file", "rb") as f:
226+
with open("receipt.pdf", "rb") as f:
226227
request.attach('receipt.pdf', f.read())
227228

228229
response = client.send_email(request)

0 commit comments

Comments
 (0)