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 support for sending text and html email simultaneously #6978

Merged
merged 1 commit into from
Aug 21, 2023
Merged
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
12 changes: 8 additions & 4 deletions packages/nodes-base/nodes/EmailSend/v2/send.operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ const properties: INodeProperties[] = [
name: 'HTML',
value: 'html',
},
{
name: 'Both',
value: 'both',
},
],
default: 'text',
},
Expand All @@ -70,7 +74,7 @@ const properties: INodeProperties[] = [
description: 'Plain text message of email',
displayOptions: {
show: {
emailFormat: ['text'],
emailFormat: ['text', 'both'],
},
},
},
Expand All @@ -85,7 +89,7 @@ const properties: INodeProperties[] = [
description: 'HTML text message of email',
displayOptions: {
show: {
emailFormat: ['html'],
emailFormat: ['html', 'both'],
},
},
},
Expand Down Expand Up @@ -208,11 +212,11 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
replyTo: options.replyTo,
};

if (emailFormat === 'text') {
if (emailFormat === 'text' || emailFormat === 'both') {
mailOptions.text = this.getNodeParameter('text', itemIndex, '');
}

if (emailFormat === 'html') {
if (emailFormat === 'html' || emailFormat === 'both') {
mailOptions.html = this.getNodeParameter('html', itemIndex, '');
}

Expand Down
Loading