feat: add resend email transport (#12645)

Co-authored-by: Erik <[email protected]>
This commit is contained in:
Nafees NazikandErik authored and GitHub committed 2023-12-04 15:31:55 -08:00
1 parent bb7057ea04
commit 325f250d39
3 files changed
+20 -1

No files matched your search

+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;
}