Skip to content

Commit

Permalink
fix: add subject field to contact email
Browse files Browse the repository at this point in the history
  • Loading branch information
acn3to committed Aug 31, 2022
1 parent 1d6cbd6 commit fcf72fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/api/contact.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nodemailer from 'nodemailer'

export default async (req, res) => {
const { name, email, message, number } = req.body
const { name, email, message, number, subject } = req.body

const transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
Expand All @@ -22,6 +22,7 @@ export default async (req, res) => {
<p><strong>Nome:</strong> ${name}</p><br>
<p><strong>Número:</strong> ${number}</p><br>
<p><strong>Email:</strong> ${email}</p><br>
<p><strong>Assunto:</strong> ${subject}</p><br>
<p><strong>Mensagem:</strong> ${message}</p><br>`,
})

Expand Down

0 comments on commit fcf72fa

Please sign in to comment.