bypass global unsubsribe (#11877)

fix/range-error
Carina Wollendorfer 2023-10-13 15:17:38 +02:00 committed by GitHub
parent cbab279c3b
commit b076a7dabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,17 @@ export default class BaseEmail {
const payload = this.getNodeMailerPayload();
const parseSubject = z.string().safeParse(payload?.subject);
const payloadWithUnEscapedSubject = {
headers: {
"X-SMTPAPI": JSON.stringify({
filters: {
bypass_list_management: {
settings: {
enable: 1,
},
},
},
}),
},
...payload,
...(parseSubject.success && { subject: decodeHTML(parseSubject.data) }),
};