feat: add resend email transport (#12645)

Co-authored-by: Erik <erik@erosemberg.com>
This commit is contained in:
Nafees Nazik
2023-12-04 15:31:55 -08:00
committed by GitHub
co-authored by Erik
parent bb7057ea04
commit 325f250d39
3 changed files with 20 additions and 1 deletions
+4
View File
@@ -196,6 +196,10 @@ EMAIL_SERVER_PORT=1025
# Make sure to run mailhog container manually or with `yarn dx`
E2E_TEST_MAILHOG_ENABLED=
# Resend
# Send transactional email using resend
# RESEND_API_KEY=
# **********************************************************************************************************
# Set the following value to true if you wish to enable Team Impersonation
+14
View File
@@ -6,6 +6,20 @@ import { isENVDev } from "@calcom/lib/env";
import { getAdditionalEmailHeaders } from "./getAdditionalEmailHeaders";
function detectTransport(): SendmailTransport.Options | SMTPConnection.Options | string {
if (process.env.RESEND_API_KEY) {
const transport = {
host: "smtp.resend.com",
secure: true,
port: 465,
auth: {
user: "resend",
pass: process.env.RESEND_API_KEY,
},
};
return transport;
}
if (process.env.EMAIL_SERVER) {
return process.env.EMAIL_SERVER;
}
+2 -1
View File
@@ -337,6 +337,7 @@
"ZOHOCRM_CLIENT_ID",
"ZOHOCRM_CLIENT_SECRET",
"ZOOM_CLIENT_ID",
"ZOOM_CLIENT_SECRET"
"ZOOM_CLIENT_SECRET",
"RESEND_API_KEY"
]
}