create and reset password Email template was changed

This commit is contained in:
Sibunnayak 2024-11-21 16:03:51 +05:30
parent 8dec31d038
commit 3f63e65138
5 changed files with 301 additions and 108 deletions

View File

@ -337,13 +337,29 @@ export const createretaildistributor = async (req, res) => {
await sendEmail({
to: `${email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Retail Distributor Account is created successfully.
<br/>name is: <strong>${name}</strong>
<br/>
<br/>MobileNumber is: <strong>${mobile_number}</strong><br/>
<br/>Email is: <strong>${email}</strong><br/>
<br/>password is: <strong>${password}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${name},</p>
<p>We are pleased to inform you that your retailer account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${name}</p>
<p><strong>Mobile Number:</strong> ${mobile_number}</p>
<br/>Email is: <strong>${email}</strong><br/>
<p><strong>Password:</strong> ${password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<p><a href="https://rd.cnapp.co.in/#/login" target="_blank" style="color: #0066cc; text-decoration: none;">Click here to log in</a></p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1SO-AgM5-cRRwDGRg9fmxDNTGNTZkBRo6/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
// Send response
res.status(201).json({
@ -550,12 +566,29 @@ export const updateKycStatus = async (req, res) => {
await sendEmail({
to: kyc.email,
from: process.env.SEND_EMAIL_FROM,
subject: `Cheminova Account Created`,
html: `Your Retail Distributor Account is created successfully.
<br/>name is: <strong>${kyc.name}</strong>
<br/>Mobile Number is: <strong>${kyc.mobile_number}</strong><br/>
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${kyc.name},</p>
<p>We are pleased to inform you that your Retailer account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${kyc.name}</p>
<p><strong>Mobile Number:</strong> ${kyc.mobile_number}</p>
<br/>Email is: <strong>${kyc.email}</strong><br/>
<br/>password is: <strong>${password}</strong><br/><br/>If you have not requested this email, please ignore it.`,
<p><strong>Password:</strong> ${password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<p><a href="https://rd.cnapp.co.in/#/login" target="_blank" style="color: #0066cc; text-decoration: none;">Click here to log in</a></p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1SO-AgM5-cRRwDGRg9fmxDNTGNTZkBRo6/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
}

View File

@ -304,13 +304,29 @@ export const uploadRetaildistributors = async (req, res) => {
await sendEmail({
to: `${item.email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Retail Distributor Account is created successfully.
<br/>name is: <strong>${item.name}</strong>
<br/>
<br/>MobileNumber is: <strong>${item.mobile_number}</strong><br/>
<br/>Email is: <strong>${item.email}</strong><br/>
<br/>password is: <strong>${password}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${name},</p>
<p>We are pleased to inform you that your Retailer account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${item.name}</p>
<p><strong>Mobile Number:</strong> ${item.mobile_number}</p>
<p><strong>Email:</strong> ${item.email}</p>
<p><strong>Password:</strong> ${password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<p><a href=" https://rd.cnapp.co.in/#/login " target="_blank" style="color: #0066cc; text-decoration: none;">Click here to log in</a></p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1SO-AgM5-cRRwDGRg9fmxDNTGNTZkBRo6/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
newlyCreated.push({ Kyc });
}
@ -335,7 +351,6 @@ export const uploadRetaildistributors = async (req, res) => {
}
};
// Helper function to upload images to Cloudinary
const uploadImage = async (image, folder) => {
if (!image) return null;
@ -391,24 +406,38 @@ export const updateretaildistributorwithKYC = async (req, res) => {
kycUpdates.pan_img = await uploadImage(files.panImg, "KYC/pan");
}
if (files.aadharImg) {
kycUpdates.aadhar_img = await uploadImage(files.aadharImg, "KYC/aadhar");
kycUpdates.aadhar_img = await uploadImage(
files.aadharImg,
"KYC/aadhar"
);
}
if (files.gstImg) {
kycUpdates.gst_img = await uploadImage(files.gstImg, "KYC/gst");
}
if (files.pesticideLicenseImg) {
kycUpdates.pesticide_license_img = await uploadImage(files.pesticideLicenseImg, "KYC/pesticide_license");
kycUpdates.pesticide_license_img = await uploadImage(
files.pesticideLicenseImg,
"KYC/pesticide_license"
);
}
if (files.fertilizerLicenseImg) {
kycUpdates.fertilizer_license_img = await uploadImage(files.fertilizerLicenseImg, "KYC/fertilizer_license");
kycUpdates.fertilizer_license_img = await uploadImage(
files.fertilizerLicenseImg,
"KYC/fertilizer_license"
);
}
if (files.selfieEntranceImg) {
kycUpdates.selfie_entrance_img = await uploadImage(files.selfieEntranceImg, "KYC/selfie_entrance");
kycUpdates.selfie_entrance_img = await uploadImage(
files.selfieEntranceImg,
"KYC/selfie_entrance"
);
}
}
// Update the KYC model
const updatedKYC = await KYC.findByIdAndUpdate(kycId, kycUpdates, { new: true });
const updatedKYC = await KYC.findByIdAndUpdate(kycId, kycUpdates, {
new: true,
});
if (!updatedKYC) {
return res.status(404).json({ message: "KYC record not found" });
}
@ -442,7 +471,8 @@ export const updateretaildistributorwithKYC = async (req, res) => {
}
res.status(200).json({
message: "Retail Distributor, KYC, and Shipping Address updated successfully",
message:
"Retail Distributor, KYC, and Shipping Address updated successfully",
success: true,
retailDistributor: updatedRetailDistributor,
kyc: updatedKYC,
@ -625,17 +655,25 @@ export const ResetPassword = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Sender email
subject: "Cheminova Account Credentials",
html: `
<p>Dear ${Retailers.name},</p>
<p>Your account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${Retailers.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
<p>Dear ${Retailers.name},</p>
<p>Your Retailer account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${Retailers.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>To log in via our website, please <a href="https://rd.cnapp.co.in/#/login" target="_blank">click here</a>.</p>
<p>To download our mobile app, use the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1SO-AgM5-cRRwDGRg9fmxDNTGNTZkBRo6/view?usp=sharing
" target="_blank">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
});
// console.log(Retailers);
res.status(200).json({
@ -1911,7 +1949,10 @@ export const generateRetailerReport = async (req, res) => {
try {
// Fetch retailer data and populate required fields
const retailers = await RetailDistributor.find()
.populate("kyc", "trade_name pan_number aadhar_number gst_number state city district address pincode")
.populate(
"kyc",
"trade_name pan_number aadhar_number gst_number state city district address pincode"
)
.populate("principal_distributer", "name")
.populate("mappedTM", "name")
.populate("mappedSC", "name")
@ -2007,4 +2048,4 @@ export const generateRetailerReport = async (req, res) => {
console.error("Error generating retailer report:", error);
res.status(500).json({ message: "Failed to generate report" });
}
};
};

View File

@ -231,11 +231,29 @@ export const uploadSalesCoordinators = async (req, res) => {
await sendEmail({
to: `${item?.email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Sales Coordinator Account is created successfully.
<br/>Name: <strong>${item?.name}</strong><br/>
<br/>Mobile Number: <strong>${item?.mobileNumber}</strong><br/>
<br/>Password: <strong>${password}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${item?.name},</p>
<p>We are pleased to inform you that your Sales Coordinator account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${item?.name}</p>
<p><strong>Mobile Number:</strong> ${item?.mobileNumber}</p>
<p><strong>Email:</strong> ${item.email}</p>
<p><strong>Password:</strong> ${password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1S8oJRz90LImcFBgMrqWZkWXDR79aBoot/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
newlyCreated.push({ salesCoordinator });
}
@ -357,11 +375,29 @@ export const verifyOtp = async (req, res) => {
await sendEmail({
to: `${salesCoordinator?.email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Sales Coordinator Account is created successfully.
<br/>name is: <strong>${name}</strong><br/>
<br/>MobileNumber is: <strong>${mobile}</strong><br/>
<br/>password is: <strong>${newPassword}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${name},</p>
<p>We are pleased to inform you that your Sales Coordinator account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${name}</p>
<p><strong>Mobile Number:</strong> ${mobile}</p>
<p><strong>Email:</strong> ${salesCoordinator.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1S8oJRz90LImcFBgMrqWZkWXDR79aBoot/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
const token = salesCoordinator.getJWTToken();
@ -751,17 +787,23 @@ export const ResetPassword = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Sender email
subject: "Cheminova Account Credentials",
html: `
<p>Dear ${salescoordinator.name},</p>
<p>Your account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${salescoordinator.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
<p>Dear ${salescoordinator.name},</p>
<p>Your Sales Coordinator account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${salescoordinator.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>To download our mobile app, use the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1S8oJRz90LImcFBgMrqWZkWXDR79aBoot/view?usp=sharing
" target="_blank">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
});
// console.log(salescoordinator);
res.status(200).json({

View File

@ -229,11 +229,26 @@ export const uploadTerritoryManagers = async (req, res) => {
await sendEmail({
to: `${item?.email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Territory Manager Account is created successfully.
<br/>name is: <strong>${item?.name}</strong><br/>
<br/>MobileNumber is: <strong>${item?.mobileNumber}</strong><br/>
<br/>password is: <strong>${password}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${item.name},</p>
<p>We are pleased to inform you that your Territory Manager account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${item.name}</p>
<p><strong>Mobile Number:</strong> ${item.mobileNumber}</p>
<p><strong>Email:</strong> ${item.email}</p>
<p><strong>Password:</strong> ${password}</p>
<br/>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GtG1ugGR2sIq2T23uMMvf-0jKGL1nh_n/view?usp=sharing" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
newlyCreated.push({ territoryManager });
}
@ -351,11 +366,26 @@ export const verifyOtp = async (req, res) => {
await sendEmail({
to: `${territoryManager?.email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Cheminova Account Created`,
html: `Your Territory Manager Account is created successfully.
<br/>name is: <strong>${name}</strong><br/>
<br/>MobileNumber is: <strong>${mobile}</strong><br/>
<br/>password is: <strong>${newPassword}</strong><br/><br/>If you have not requested this email, please ignore it.`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
<p>Dear ${name},</p>
<p>We are pleased to inform you that your Territory Manager account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${name}</p>
<p><strong>Mobile Number:</strong> ${mobile}</p>
<p><strong>Email:</strong> ${territoryManager.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<br/>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GtG1ugGR2sIq2T23uMMvf-0jKGL1nh_n/view?usp=sharing" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
const token = territoryManager.getJWTToken();
@ -603,17 +633,22 @@ export const ResetPassword = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Sender email
subject: "Cheminova Account Credentials",
html: `
<p>Dear ${territorymanager.name},</p>
<p>Your account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${territorymanager.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
<p>Dear ${territorymanager.name},</p>
<p>Your Territory Manager account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${territorymanager.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>To download our mobile app, use the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GtG1ugGR2sIq2T23uMMvf-0jKGL1nh_n/view?usp=sharing " target="_blank">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
});
// console.log(territorymanager);
res.status(200).json({

View File

@ -333,15 +333,30 @@ export const uploadPrincipaldistributors = async (req, res) => {
await sendEmail({
to: distributor.email,
from: process.env.SEND_EMAIL_FROM,
subject: `Cheminova Account Created`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
Your Principal Distributor Account is created successfully.
<br/>Name: <strong>${distributor.name}</strong><br/>
<br/>Mobile Number: <strong>${distributor.phone}</strong><br/>
<br/>Password: <strong>${password}</strong><br/><br/>
<a href="${process.env.PD_APP_URL}/login">Click here to login</a><br/><br/>
If you have not requested this email, please ignore it.
`,
<p>Dear ${distributor.name},</p>
<p>We are pleased to inform you that your Principal Distributor account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${distributor.name}</p>
<p><strong>Mobile Number:</strong> ${distributor.phone}</p>
<p><strong>Email:</strong> ${distributor.email}</p>
<p><strong>Password:</strong> ${distributor.password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<p><a href=" https://pd.cnapp.co.in/#/login
" target="_blank" style="color: #0066cc; text-decoration: none;">Click here to log in</a></p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GOpyyEwfbE0cMzvHHx0Fr7UOFzrQVIlp/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
// Now create the address for the new user
const addressData = {
@ -441,14 +456,29 @@ export const registerUser = async (req, res) => {
await sendEmail({
to: email,
from: process.env.SEND_EMAIL_FROM,
subject: `Cheminova Account Created`,
subject: `Welcome to Cheminova - Account Created Successfully`,
html: `
Your Principal Distributor Account is created successfully.
<br/>Name: <strong>${name}</strong><br/>
<br/>Mobile Number: <strong>${phone}</strong><br/>
<br/>Password: <strong>${password}</strong><br/><br/>
<a href="${process.env.PD_APP_URL}/login">Click here to login</a><br/><br/>
If you have not requested this email, please ignore it.
<p>Dear ${name},</p>
<p>We are pleased to inform you that your Principal Distributor account has been successfully created. Please find your account details below:</p>
<p><strong>Name:</strong> ${name}</p>
<p><strong>Mobile Number:</strong> ${phone}</p>
<p><strong>Email:</strong> ${email}</p>
<p><strong>Password:</strong> ${password}</p>
<br/>
<p>You can log in to your account using the following link:</p>
<p><a href=" https://pd.cnapp.co.in/#/login
" target="_blank" style="color: #0066cc; text-decoration: none;">Click here to log in</a></p>
<br/>
<p>For convenience, you can also download our mobile app from the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GOpyyEwfbE0cMzvHHx0Fr7UOFzrQVIlp/view?usp=sharing
" target="_blank" style="color: #0066cc; text-decoration: none;">Download Mobile Application</a></li>
</ul>
<br/>
<p>If you have not requested this email or have any concerns, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p><strong>Cheminova Support Team</strong></p>
`,
});
}
@ -573,7 +603,9 @@ export const ResetPasswordAdmin = async (req, res) => {
const user = await User.findById(id);
if (!user) {
return res.status(404).json({ message: "Principal Distributor not found" });
return res
.status(404)
.json({ message: "Principal Distributor not found" });
}
// Generate a new random password
@ -591,24 +623,34 @@ export const ResetPasswordAdmin = async (req, res) => {
user.password = newPassword;
await user.save();
// Send email with the new credentials
// Send email with the new credentials
await sendEmail({
to: `${user.email}`, // Recipient email
from: `${process.env.SEND_EMAIL_FROM}`, // Sender email
subject: "Cheminova Account Credentials",
html: `
<p>Dear ${user.name},</p>
<p>Your account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${user.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
<p>Dear ${user.name},</p>
<p>Your Principal Distributor account credentials have been updated. Please find your new login details below:</p>
<p><strong>Email:</strong> ${user.email}</p>
<p><strong>Password:</strong> ${newPassword}</p>
<p>Please use these credentials to log in to your account. For security reasons, it's recommended to change your password after logging in.</p>
<br/>
<p>To log in via our website, please <a href="https://pd.cnapp.co.in/#/login
" target="_blank">click here</a>.</p>
<p>To download our mobile app, use the following links:</p>
<ul>
<li><a href="https://drive.google.com/file/d/1GOpyyEwfbE0cMzvHHx0Fr7UOFzrQVIlp/view?usp=sharing
" target="_blank">Download Mobile APplication</a></li>
</ul>
<br/>
<p>If you did not request this change, please contact our support team immediately.</p>
<br/>
<p>Best regards,</p>
<p>Cheminova Support Team</p>
`,
});
// console.log(user);
res.status(200).json({
success: true,