mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -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;
|
||||
|
||||
const mailOptions = {
|
||||
from: email.from,
|
||||
to: email.to,
|
||||
cc: email.cc,
|
||||
bcc: email.bcc,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 <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