mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(SendGrid Node): Add option to specify "reply to" email addresses (#14282)
This commit is contained in:
@@ -524,6 +524,7 @@ export class SendGrid implements INodeType {
|
||||
attachments,
|
||||
categories,
|
||||
ipPoolName,
|
||||
replyToEmail,
|
||||
} = this.getNodeParameter('additionalFields', i) as {
|
||||
bccEmail: string;
|
||||
ccEmail: string;
|
||||
@@ -533,6 +534,7 @@ export class SendGrid implements INodeType {
|
||||
attachments: string;
|
||||
categories: string;
|
||||
ipPoolName: string;
|
||||
replyToEmail: string;
|
||||
};
|
||||
|
||||
const body: SendMailBody = {
|
||||
@@ -630,6 +632,12 @@ export class SendGrid implements INodeType {
|
||||
body.personalizations[0].send_at = moment.tz(sendAt, timezone).unix();
|
||||
}
|
||||
|
||||
if (replyToEmail) {
|
||||
body.reply_to_list = replyToEmail
|
||||
.split(',')
|
||||
.map((entry) => ({ email: entry.trim() }));
|
||||
}
|
||||
|
||||
const data = await sendGridApiRequest.call(this, '/mail/send', 'POST', body, qs, {
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user