Skip to content

Commit

Permalink
Merge pull request #25 from Louis3797/fix/link-http-methods
Browse files Browse the repository at this point in the history
Verification link contains GET instead of POST close #24
  • Loading branch information
Louis3797 authored Nov 8, 2024
2 parents 470cb2c + 1798c13 commit f882b36
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/utils/sendEmail.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export const sendResetEmail = (email: string, token: string) => {
from: config.email.from,
to: email,
subject: 'Password reset',
html: `Please click <a href="${resetLink}">here</a> to reset your password.`
html: `
<p>Please reset your password by clicking the button below:</p>
<form action="${resetLink}" method="POST">
<button type="submit">Reset Password</button>
</form>
`
};
console.log(resetLink);
transporter?.sendMail(mailOptions, (error, info) => {
Expand All @@ -38,7 +43,12 @@ export const sendVerifyEmail = (email: string, token: string) => {
from: config.email.from,
to: email,
subject: 'Email verification',
html: `Please click <a href="${verifyLink}">here</a> to verify your email.`
html: `
<p>Please verify your email by clicking the button below:</p>
<form action="${verifyLink}" method="POST">
<button type="submit">Verify Email</button>
</form>
`
};
console.log(verifyLink);
transporter?.sendMail(mailOptions, (error, info) => {
Expand Down

0 comments on commit f882b36

Please sign in to comment.