Created
October 1, 2023 15:01
-
-
Save rishavk1102/809a05636a01f1d2fb21bbd766c3224b to your computer and use it in GitHub Desktop.
Sample request for calling the SendGrid API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"from": { | |
"name": "Rishav", | |
"email": "hi@whoisrishav.com" | |
}, | |
"to": [ | |
"rishav@domain.com", | |
"rishav@domain1.com" | |
], | |
"cc": [ | |
"rishav@domain2.com" | |
], | |
"bcc": [], | |
"subject": "__subject_of_email__", | |
"text": "Here is the image and the pdf you were looking for.", | |
"html": "<p>Here is the image and the pdf you were looking for <img src='cid:user' /> </p>", | |
"attachments": [ | |
{ | |
"content": "base64-encoded-content", | |
"filename": "example.pdf", | |
"type": "application/pdf", | |
"disposition": "attachment" | |
}, | |
{ | |
"content": "base64-encoded-content", | |
"filename": "example.txt", | |
"type": "image/png", | |
"disposition": "inline", | |
"content_id": "user" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment