File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,17 @@ import { render } from "@react-email/render";
3
3
import { NextResponse } from "next/server" ;
4
4
import nodemailer from "nodemailer" ;
5
5
6
- export async function GET ( req : Request ) {
6
+ export async function GET ( ) {
7
7
try {
8
+ console . log ( "ENTERED TEST EMAIL" ) ;
8
9
const transporter = nodemailer . createTransport ( {
9
10
service : "gmail" ,
10
11
auth : {
11
12
user : process . env . EMAIL ,
12
13
pass : process . env . PASSWORD ,
13
14
} ,
14
15
} ) ;
16
+ console . log ( "CREATED TRANSPORTER" ) ;
15
17
const emailHtml = render (
16
18
FeedbackEmail ( {
17
19
name : "TESTING01" ,
@@ -25,7 +27,9 @@ export async function GET(req: Request) {
25
27
subject : `Just testing this email` ,
26
28
html : emailHtml ,
27
29
} ;
30
+ console . log ( "CREATED OPTIONS" ) ;
28
31
transporter . sendMail ( options ) ;
32
+ console . log ( "SENT EMAIL" ) ;
29
33
return NextResponse . json ( { message : "Success" } , { status : 200 } ) ;
30
34
} catch ( error ) {
31
35
console . log ( error ) ;
You can’t perform that action at this time.
0 commit comments