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

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

Merged
merged 1 commit into from
May 7, 2024
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
8 changes: 8 additions & 0 deletions packages/nodes-base/credentials/Smtp.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
];
}
4 changes: 4 additions & 0 deletions packages/nodes-base/nodes/EmailSend/v2/send.operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading