The email address of the recipient.
The subject line of your email.
The email address of the sender.
The email address to which responses will be sent.
The mime type of the content you are including in your email. For example, text/plain or text/html.
The actual content of the specified mime type that you are including in your email.
async
(params, auths) => {
}
const axios = require('axios')
return await require("@pipedreamhq/platform").axios(this, {
url: `https://api.sendgrid.com/v3/mail/send`,
headers: {
Authorization: `Bearer ${auths.sendgrid.api_key}`,
},
method: 'POST',
data: {
"personalizations": [{
"to": [{
"email": params.to_email,
"name": params.to_name
}],
"subject": params.subject,
"headers": params.headers,
"substitutions": params.substitutions,
"custom_args": params.custom_args,
"send_at": params.send_at
}],
"from": {
"email": params.from_email,
"name": params.from_name
},
"reply_to": {
"email": params.reply_to_email,
"name": params.reply_to_name
},
"content": [{
"type": params.type,
"value": params.value
}],
"template_id": params.template_id,
"sections": params.sections,
"categories": params.categories,
"batch_id": params.batch_id,
"ip_pool_name": params.ip_pool_name
}
})