From d0d52def8fb4113a7a4866d30f2e9c7bfe11075e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 7 May 2024 17:38:23 +0200 Subject: [PATCH] feat(Send Email Node): Add an option to customize client host-name on SMTP connections (#9322) --- packages/nodes-base/credentials/Smtp.credentials.ts | 8 ++++++++ packages/nodes-base/nodes/EmailSend/v2/send.operation.ts | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/packages/nodes-base/credentials/Smtp.credentials.ts b/packages/nodes-base/credentials/Smtp.credentials.ts index 8c0e58f3c3..28817bdc88 100644 --- a/packages/nodes-base/credentials/Smtp.credentials.ts +++ b/packages/nodes-base/credentials/Smtp.credentials.ts @@ -41,5 +41,13 @@ export class Smtp implements ICredentialType { type: 'boolean', default: true, }, + { + displayName: 'Client Host Name', + name: 'hostName', + type: 'string', + default: '', + placeholder: '', + description: 'The hostname of the client, used for identifying to the server', + }, ]; } diff --git a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts index a6ef660c64..8e9623c67d 100644 --- a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts +++ b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts @@ -210,6 +210,10 @@ function configureTransport(credentials: IDataObject, options: EmailSendOptions) secure: credentials.secure as boolean, }; + if (typeof credentials.hostName === 'string' && credentials.hostName) { + connectionOptions.name = credentials.hostName; + } + if (credentials.user || credentials.password) { connectionOptions.auth = { user: credentials.user as string,