diff --git a/src/emails/index.ts b/src/emails/index.ts index fbeb9416..de6ed64e 100644 --- a/src/emails/index.ts +++ b/src/emails/index.ts @@ -31,11 +31,11 @@ async function sendEmail(emailType: EmailType, recipient: string, data: Data) { // Send the Email - const domain2 = process.env.MAILERSEND_DOMAIN - const key2 = process.env.MAILERSEND_TOKEN - const body2 = { + const domain = process.env.MAILERSEND_DOMAIN + const key = process.env.MAILERSEND_TOKEN + const body = { 'from': { - 'email': `info@${domain2}`, + 'email': `info@${domain}`, }, 'to': [ { @@ -46,10 +46,10 @@ async function sendEmail(emailType: EmailType, recipient: string, data: Data) { 'html': html } const mailersend = 'https://api.mailersend.com/v1/email' - const response = await axios.post(mailersend, body2, { + const response = await axios.post(mailersend, body, { headers: { 'Content-Type': 'application/json', - 'Authorization': `Bearer ${key2}` + 'Authorization': `Bearer ${key}` } }); return response