feat(Send Email Node): Add an option to customize client host-name on SMTP connections (#9322)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-05-07 17:38:23 +02:00 committed by GitHub
parent 491c6ec546
commit d0d52def8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -41,5 +41,13 @@ export class Smtp implements ICredentialType {
type: 'boolean', type: 'boolean',
default: true, default: true,
}, },
{
displayName: 'Client Host Name',
name: 'hostName',
type: 'string',
default: '',
placeholder: '',
description: 'The hostname of the client, used for identifying to the server',
},
]; ];
} }

View file

@ -210,6 +210,10 @@ function configureTransport(credentials: IDataObject, options: EmailSendOptions)
secure: credentials.secure as boolean, secure: credentials.secure as boolean,
}; };
if (typeof credentials.hostName === 'string' && credentials.hostName) {
connectionOptions.name = credentials.hostName;
}
if (credentials.user || credentials.password) { if (credentials.user || credentials.password) {
connectionOptions.auth = { connectionOptions.auth = {
user: credentials.user as string, user: credentials.user as string,