Skip to content

Commit

Permalink
example: update send email with attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
drish committed Jul 3, 2024
1 parent e3492d2 commit 6249b54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/with_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
).read()

# Define the file attachment
attachment: resend.Attachment = {"filename": "invoice.pdf", "content": list(f)}
attachment: resend.Attachment = {
"filename": "invoice.pdf",
"content": list(f),
"content_type": "application/pdf",
}

# Define the email parameters
params: resend.Emails.SendParams = {
Expand Down

0 comments on commit 6249b54

Please sign in to comment.