Add sender name parameter to Gmail Node (#2038)

*  Add sender name parameter

*  Small description improvement

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza 2021-07-30 10:26:57 -04:00 committed by GitHub
parent a661dece4d
commit f372459ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -142,6 +142,7 @@ export async function encodeEmail(email: IEmail) {
let mailBody: Buffer;
const mailOptions = {
from: email.from,
to: email.to,
cc: email.cc,
bcc: email.bcc,

View file

@ -45,6 +45,7 @@ import {
} from 'lodash';
export interface IEmail {
from?: string;
to?: string;
cc?: string;
bcc?: string;
@ -355,6 +356,7 @@ export class Gmail implements INodeType {
}
const email: IEmail = {
from: additionalFields.senderName as string || '',
to: toStr,
cc: ccStr,
bcc: bccStr,
@ -455,6 +457,7 @@ export class Gmail implements INodeType {
}
const email: IEmail = {
from: additionalFields.senderName as string || '',
to: toStr,
cc: ccStr,
bcc: bccStr,

View file

@ -277,6 +277,16 @@ export const messageFields = [
placeholder: 'info@example.com',
default: [],
},
{
displayName: 'Sender Name',
name: 'senderName',
type: 'string',
placeholder: 'Name <test@gmail.com>',
default: '',
description: `The name displayed in your contacts inboxes.</br>
It has to be in the format: "Display-Name &#60;name@gmail.com&#62;".</br>
The email address has to match the email address of the logged in user for the API`,
},
],
},
{