Templates not being accessed?
See original GitHub issueI’m using this library but when I see the email preview, it only it shows “from”, “to”, “messageid” and “date”. It doesn’t have a subject and body like your preview example. It also doesn’t send when I change the send property to true.
I think the template isn’t being acquired properly so I did a ‘console.log(email.getTemplatePath());’ but it shows ‘TypeError: Path must be a string. Received undefined’. I’m not sure why thats happening as my structure is:
.
├── helpers
├── email.js
└── emails
└── signup_consumer
├── html.pug
└── subject.pug
my code is:
const email = new Email({
message: {
from: 'email@mail.com'
},
send: true,
transport: {
jsonTransport: true
}
});
email
.send({
template: 'signup_consumer',
message: {
to: user.email
},
locals: {
name: 'exampleuser',
sitelink: 'example.com',
}
})
.then(console.log)
.catch(console.error);
//console.log(email.getTemplatePath());
Issue Analytics
- State:
- Created 6 years ago
- Comments:32
Top Results From Across the Web
Access 365 Templates cannot be opened - Microsoft Community
Hi Mike, I'm an independent adviser and will try to help. Based on the error message, it would appear that somehow the template...
Read more >Troubleshooting guide for Shared Email Templates for Outlook
This guide presents possible solutions to problems you might encounter when installing, running, or using the Shared Email Templates for Outlook add-in.
Read more >Error resolving template "index", template might not exist or ...
I fixed it but I am still getting the same error. The index.html file is currently in the templates directory. – Mike3355. Aug...
Read more >System Administrator can't access Email Templates
It appears that '"Enable Classic email templates and related features" is not enabled in the org. You can do to resolve by using...
Read more >Customize Email Templates - Auth0
Auth0 does not support plaintext/text-based emails. ... The attributes available for the user object will depend on the type of connection being used....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It was looking for the path on ‘root/emails’ instead of in ‘root/helpers/emails’. I changed the path manually on email.config.views.root:
My mistake, I thought it would look from current directory not from root. Feel free to remove this issue.
Thanks a lot.