Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Add sender name parameter #2038

Merged
merged 3 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions packages/nodes-base/nodes/Google/Gmail/Gmail.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
} from 'lodash';

export interface IEmail {
from?: string;
to?: string;
cc?: string;
bcc?: string;
Expand Down Expand Up @@ -355,6 +356,7 @@ export class Gmail implements INodeType {
}

const email: IEmail = {
from: additionalFields.senderName as string || '',
to: toStr,
cc: ccStr,
bcc: bccStr,
Expand Down Expand Up @@ -455,6 +457,7 @@ export class Gmail implements INodeType {
}

const email: IEmail = {
from: additionalFields.senderName as string || '',
to: toStr,
cc: ccStr,
bcc: bccStr,
Expand Down
10 changes: 10 additions & 0 deletions packages/nodes-base/nodes/Google/Gmail/MessageDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
},
],
},
{
Expand Down