feat: add resend email transport (#12645)
Co-authored-by: Erik <erik@erosemberg.com>
This commit is contained in:
parent
bb7057ea04
commit
325f250d39
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -337,6 +337,7 @@
|
|||
"ZOHOCRM_CLIENT_ID",
|
||||
"ZOHOCRM_CLIENT_SECRET",
|
||||
"ZOOM_CLIENT_ID",
|
||||
"ZOOM_CLIENT_SECRET"
|
||||
"ZOOM_CLIENT_SECRET",
|
||||
"RESEND_API_KEY"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user