Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var data = {
- "templateId":template_id,
- "to":[{"name":object.recipient_name,"email":object.recipient_email}],
- "cc":[{"email":object.sender_email}],
- "tags":["Recipient Email"],
- "params":{
- "SUBJECT":subject,
- "TITLE":subject.toUpperCase(),
- "MESSAGE":object.personalized_message,
- "IMAGE":object.personalized_doodle,"IMAGE_WIDTH":IMAGE_WIDTH,"IMAGE_HEIGHT":IMAGE_HEIGHT,
- "NOTE":object.delivery_completed_note.toUpperCase(),
- "COUPON":object.coupon_code,
- },
- }
- await
- axios({
- url:"https://api.sendinblue.com/v3/smtp/email",
- method:'post',
- headers:{ 'api-key': sendinblue },
- data: data
- })
- .then(function (response) {
- print(`Recipient Sent:${object.recipient_email}`);
- })
- .catch(function (err) {
- print(`Recipient Err:${err}`);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement