-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
623b13a
commit 1c7b77c
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,13 @@ import { sampleSize } from "lodash"; | |
import path from "node:path"; | ||
import { DO_NOT_SEND_MAIL, ZAMMAD_TOKEN, ZAMMAD_URL } from "../config/env"; | ||
import { render } from "../services/renderer"; | ||
import { LocalTemplateSlug } from "./sendinblue"; | ||
import { LocalTemplate } from "./sendinblue"; | ||
|
||
// | ||
|
||
const CLOSED_STATE_ID = "4"; | ||
const CREATE_TICKET_ENDPOINT = `${ZAMMAD_URL}/api/v1/tickets`; | ||
const EMAIL_TYPE_ID = 1; | ||
const FROM_MON_COMPTE_PRO = "MonComptePro"; | ||
const GROUP_MON_COMPTE_PRO = "MonComptePro"; | ||
const GROUP_MON_COMPTE_PRO_SENDER_ID = 1; | ||
const MODERATION_TAG = "moderation"; | ||
|
@@ -25,15 +24,11 @@ export async function sendZammadMail({ | |
subject, | ||
template, | ||
params, | ||
senderEmail = "[email protected]", | ||
}: { | ||
to: string[]; | ||
cc?: string[]; | ||
subject: string; | ||
template: LocalTemplateSlug; | ||
params: any; | ||
senderEmail?: string; | ||
}) { | ||
} & LocalTemplate) { | ||
const body = await render( | ||
path.resolve(`${__dirname}/../views/mails/${template}.ejs`), | ||
params, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters