-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ayush Sharma <[email protected]>
- Loading branch information
1 parent
6c0dd32
commit 052495e
Showing
1 changed file
with
4 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,21 +20,15 @@ const subscribeNewsletter = async (req, res) => { | |
const newSubscriber = new Newsletter({ email }); | ||
await newSubscriber.save(); | ||
|
||
// Configure the transporter | ||
// const transporter = nodemailer.createTransport({ | ||
// service: "gmail", | ||
// auth: { | ||
// user: process.env.EMAIL_USER, // Use environment variables in production | ||
// pass: process.env.EMAIL_PASS, | ||
// }, | ||
// }); | ||
Configure the transporter | ||
const transporter = nodemailer.createTransport({ | ||
service: "gmail", | ||
auth: { | ||
user: "[email protected]", // Your email | ||
pass: "kmepakzcabvztekd", // Your email password | ||
user: process.env.EMAIL_USER, // Use environment variables in production | ||
pass: process.env.EMAIL_PASS, | ||
}, | ||
}); | ||
|
||
const mailOptions = { | ||
from: "[email protected]", | ||
to: email, // Send confirmation email to the subscriber's email | ||
|