Skip to content

Commit

Permalink
update email route
Browse files Browse the repository at this point in the history
  • Loading branch information
raspberri05 committed Dec 13, 2024
1 parent 3db2d9d commit ce31e27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/api/contact/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export async function POST(req: Request) {
const { email, message } = schema.parse(body);

const transporter = nodemailer.createTransport({
service: "gmail",
host: "smtp.gmail.com",
port: Number(process.env.PORT),
service: process.env.EMAIL_SERVICE,
host: process.env.EMAIL_HOST,
port: Number(process.env.EMAIL_PORT),
auth: {
user: process.env.EMAIL,
pass: process.env.PASS,
user: process.env.EMAIL_SENDER,
pass: process.env.EMAIL_PASSWORD,
},
});

const mailOptions = {
to: process.env.EMAIL,
to: process.env.EMAIL_SENDER,
subject: "New Contact Form Submission",
html: `<p>You have received a new message:</p>
<p><strong>Email:</strong> ${email}</p>
Expand Down

0 comments on commit ce31e27

Please sign in to comment.