i´m using a .env file to hide my email.js, but it doesn´t work.
Putting de ids directly using ” work, but when i use .env not
import emailjs from '@emailjs/browser';
import dotenv from 'dotenv';
dotenv.config();
const sendEmail = (templateParams) => {
emailjs.send(process.env.service_id, process.env.template_id, templateParams, process.env.user_id)
.then((response) => {
console.log('SUCCESS!', response.status, response.text);
}, (error) => {
console.log('FAILED...', error);
});
}
export default sendEmail;
the env file is in the same folder that .gitignore file
I want to hide my keys. is there any solution.