fix: remove isPersonalEmail logic

This commit is contained in:
Rotimi Best
2024-09-23 21:18:33 +01:00
parent eaf078d8e2
commit 7c9b7bb920
5 changed files with 8 additions and 10 deletions
+2 -3
View File
@@ -12,7 +12,7 @@ nodemailerTransporter().then((t) => {
});
async function sendWithNodemailer(emailData) {
const { from, to, subject, content, isPersonalEmail, replyTo } = emailData;
const { from, to, subject, content, replyTo } = emailData;
if (!transporter) {
return;
@@ -74,7 +74,6 @@ emailRouter.post('/', async (req, res) => {
to: zod.string(),
subject: zod.string(),
content: zod.string(),
isPersonalEmail: zod.boolean().optional(),
replyTo: zod.string().optional()
})
);
@@ -88,7 +87,7 @@ emailRouter.post('/', async (req, res) => {
let res;
try {
if (emailData.isPersonalEmail || !ZOHO_TOKEN) {
if (!ZOHO_TOKEN) {
res = await sendWithNodemailer(emailData);
} else {
res = await sendWithZoho(emailData);