mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ 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:
parent
a661dece4d
commit
f372459ecc
|
@ -142,6 +142,7 @@ export async function encodeEmail(email: IEmail) {
|
||||||
let mailBody: Buffer;
|
let mailBody: Buffer;
|
||||||
|
|
||||||
const mailOptions = {
|
const mailOptions = {
|
||||||
|
from: email.from,
|
||||||
to: email.to,
|
to: email.to,
|
||||||
cc: email.cc,
|
cc: email.cc,
|
||||||
bcc: email.bcc,
|
bcc: email.bcc,
|
||||||
|
|
|
@ -45,6 +45,7 @@ import {
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
|
|
||||||
export interface IEmail {
|
export interface IEmail {
|
||||||
|
from?: string;
|
||||||
to?: string;
|
to?: string;
|
||||||
cc?: string;
|
cc?: string;
|
||||||
bcc?: string;
|
bcc?: string;
|
||||||
|
@ -355,6 +356,7 @@ export class Gmail implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
const email: IEmail = {
|
const email: IEmail = {
|
||||||
|
from: additionalFields.senderName as string || '',
|
||||||
to: toStr,
|
to: toStr,
|
||||||
cc: ccStr,
|
cc: ccStr,
|
||||||
bcc: bccStr,
|
bcc: bccStr,
|
||||||
|
@ -455,6 +457,7 @@ export class Gmail implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
const email: IEmail = {
|
const email: IEmail = {
|
||||||
|
from: additionalFields.senderName as string || '',
|
||||||
to: toStr,
|
to: toStr,
|
||||||
cc: ccStr,
|
cc: ccStr,
|
||||||
bcc: bccStr,
|
bcc: bccStr,
|
||||||
|
|
|
@ -277,6 +277,16 @@ export const messageFields = [
|
||||||
placeholder: 'info@example.com',
|
placeholder: 'info@example.com',
|
||||||
default: [],
|
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 <name@gmail.com>".</br>
|
||||||
|
The email address has to match the email address of the logged in user for the API`,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue