Skip to content

Commit

Permalink
Update OtherController.js
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Sharma <[email protected]>
  • Loading branch information
AyushSharma72 authored Nov 5, 2024
1 parent 6c0dd32 commit 052495e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions server/Controllers/OtherController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 052495e

Please sign in to comment.