File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ NEXT_PUBLIC_BREVO_API_KEY = your_brevo_api_key_here
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ yarn-error.log*
2727.pnpm-debug.log *
2828
2929# local env files
30+ .env
3031.env * .local
3132
3233# vercel
Original file line number Diff line number Diff line change 11import axios from "axios" ;
22import { notify } from "./notification" ;
3- const brevo_key = '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' ;
3+
4+ const brevo_key = process . env . NEXT_PUBLIC_BREVO_API_KEY ;
45
56export const sendEmail = async ( email ) => {
67 try {
8+ if ( ! brevo_key ) {
9+ console . error ( "Brevo API key is not configured" ) ;
10+ notify ( "Email service configuration error" , "error" ) ;
11+ return ;
12+ }
13+
714 if ( validateEmail ( email ) ) {
815 const options = {
916 method : "POST" ,
You can’t perform that action at this time.
0 commit comments