mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(Send Email Node): Add support for sending text and html email simultaneously (#6978)
This commit is contained in:
@@ -56,6 +56,10 @@ const properties: INodeProperties[] = [
|
|||||||
name: 'HTML',
|
name: 'HTML',
|
||||||
value: 'html',
|
value: 'html',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Both',
|
||||||
|
value: 'both',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'text',
|
default: 'text',
|
||||||
},
|
},
|
||||||
@@ -70,7 +74,7 @@ const properties: INodeProperties[] = [
|
|||||||
description: 'Plain text message of email',
|
description: 'Plain text message of email',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
emailFormat: ['text'],
|
emailFormat: ['text', 'both'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -85,7 +89,7 @@ const properties: INodeProperties[] = [
|
|||||||
description: 'HTML text message of email',
|
description: 'HTML text message of email',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
emailFormat: ['html'],
|
emailFormat: ['html', 'both'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -208,11 +212,11 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
|||||||
replyTo: options.replyTo,
|
replyTo: options.replyTo,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (emailFormat === 'text') {
|
if (emailFormat === 'text' || emailFormat === 'both') {
|
||||||
mailOptions.text = this.getNodeParameter('text', itemIndex, '');
|
mailOptions.text = this.getNodeParameter('text', itemIndex, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emailFormat === 'html') {
|
if (emailFormat === 'html' || emailFormat === 'both') {
|
||||||
mailOptions.html = this.getNodeParameter('html', itemIndex, '');
|
mailOptions.html = this.getNodeParameter('html', itemIndex, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user