mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
feat(Send Email Node): Add an option to customize client host-name on SMTP connections (#9322)
This commit is contained in:
parent
491c6ec546
commit
d0d52def8f
|
@ -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',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue