mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 05:47:31 -08:00
feat(Send Email Node): Add support for sending text and html email simultaneously (#6978)
This commit is contained in:
parent
475d9c98e8
commit
3860d41d73
|
@ -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, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue