mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(AWS SES Node): Fix issue with email aliases not working for sending from or sending to (#9811)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import qs from 'node:querystring';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
@@ -13,7 +14,7 @@ import { awsApiRequestSOAP, awsApiRequestSOAPAllItems } from './GenericFunctions
|
||||
|
||||
function setParameter(params: string[], base: string, values: string[]) {
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
params.push(`${base}.${i + 1}=${values[i]}`);
|
||||
params.push(`${base}.${i + 1}=${encodeURIComponent(values[i])}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -843,22 +844,20 @@ export class AwsSes implements INodeType {
|
||||
|
||||
const templateSubject = this.getNodeParameter('templateSubject', i) as string;
|
||||
|
||||
const params = [
|
||||
'Action=CreateCustomVerificationEmailTemplate',
|
||||
`FailureRedirectionURL=${failureRedirectionURL}`,
|
||||
`FromEmailAddress=${email}`,
|
||||
`SuccessRedirectionURL=${successRedirectionURL}`,
|
||||
`TemplateContent=${templateContent}`,
|
||||
`TemplateName=${templateName}`,
|
||||
`TemplateSubject=${templateSubject}`,
|
||||
];
|
||||
|
||||
responseData = await awsApiRequestSOAP.call(
|
||||
this,
|
||||
'email',
|
||||
'POST',
|
||||
'',
|
||||
params.join('&'),
|
||||
qs.stringify({
|
||||
Action: 'CreateCustomVerificationEmailTemplate',
|
||||
FromEmailAddress: email,
|
||||
SuccessRedirectionURL: successRedirectionURL,
|
||||
FailureRedirectionURL: failureRedirectionURL,
|
||||
TemplateName: templateName,
|
||||
TemplateSubject: templateSubject,
|
||||
TemplateContent: templateContent,
|
||||
}),
|
||||
);
|
||||
|
||||
responseData = responseData.CreateCustomVerificationEmailTemplateResponse;
|
||||
@@ -1012,7 +1011,7 @@ export class AwsSes implements INodeType {
|
||||
|
||||
const params = [
|
||||
`Message.Subject.Data=${encodeURIComponent(subject)}`,
|
||||
`Source=${fromEmail}`,
|
||||
`Source=${encodeURIComponent(fromEmail)}`,
|
||||
];
|
||||
|
||||
if (isBodyHtml) {
|
||||
|
||||
Reference in New Issue
Block a user