You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When process.env is set to development it works. But when set to production it fails.
Getting following error:
{ [Error: ENOENT: no such file or directory, open 'C:\Dev\undefined\temp\92129402-b28f-42b7-83f2-8e52fc72b2ee.html']
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path:
'C:\Dev\undefined\temp\92129402-b28f-42b7-83f2-8e52fc72b2ee.html' }
Any ideas?
Code
let newEmail = require('email-templates');
process.env = 'production'
let email = new newEmail({
message: {
from: 'mail@mail.com'
},
transport: {
jsonTransport: true,
}
});
email.send({
template: 'registerUserEmail',
message: {
to: 'mail@mail.com'
},
locals: {
name: 'Elon'
}
}).then(console.log).catch(console.log)
The text was updated successfully, but these errors were encountered:
Hello
Experimenting abit with this lib. I do want to use it.
Using Windows 10
Node 11.5
Email-Templates 7.0.4
Folder structure:
sendMail.js
emails\registerUserEmail\html.pug
email\registerUserEmail\subject.pug
email\registerUserEmail\text.pug
When process.env is set to development it works. But when set to production it fails.
Getting following error:
{ [Error: ENOENT: no such file or directory, open 'C:\Dev\undefined\temp\92129402-b28f-42b7-83f2-8e52fc72b2ee.html']
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path:
'C:\Dev\undefined\temp\92129402-b28f-42b7-83f2-8e52fc72b2ee.html' }
Any ideas?
Code
The text was updated successfully, but these errors were encountered: