Closed tiavina-mika closed 2 years ago
The file paths only seem to include the filename, but no path. Check whether that is correct.
here is the log of the path:
E:\tiavina-mika\portfolio-v3\templates\projects\projectsSubject.txt
it seems correct
Yes, I just noticed you are using a custom function to generate the path.
The issue is that textPath
is not optional, only htmlPath
is optional:
The textPath should point to a file that is used in case a mail browser is not able to display HTML.
ah ok. thanks. But the doc is not clear, how to send an email manually? for exemple, I have a Project class, I want to send email containing the project description every time I added a new "project", in the Parse.Cloud.beforeSave for exemple
New Issue Checklist
Issue Description
I'm getting this error: Error: ApiMailAdapter: template content path is invalid with my config. my filePath is E:\tiavina-mika\portfolio-v3\email\templates\projects\projectsSubject.txt
Steps to reproduce
here is my files:
mailgunConfig.js
server.js (Next.js custom server + express)
folder structures
Actual Outcome
` E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:601 throw Errors.Error.templateContentPathInvalid; ^
Error: ApiMailAdapter: template content path is invalid. at Function.get (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\Errors.js:62:37) at ApiMailAdapter._validateTemplate (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:601:22) at new ApiMailAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:83:13) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:35:16) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:48:12) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:50:12) at getUserController (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Controllers\index.js:169:65) at Object.getControllers (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Controllers\index.js:81:26) at new ParseServer (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\ParseServer.js:110:40) at new _ParseServer (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\index.js:92:18) [nodemon] app crashed - waiting for file changes before starting... `
Expected Outcome
[nodemon] starting
node server.jsinfo - Loaded env from E:\tiavina-mika\portfolio-v3\.env.local info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5 info - Using external babel configuration from E:\tiavina-mika\portfolio-v3\.babelrc (node:13856) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version. (Use
node --trace-deprecation ...to show where the warning was created) event - compiled successfully Notre serveur tourne en mode development sur http://localhost:3001 event - build page: /api/parse/[...id] wait - compiling... event - compiled successfully
Environment
Node: 14.15.4 Npm: 7.20.1 "next": "11.1.2"
2.1.0
4.10.3
Logs
E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:601 throw Errors.Error.templateContentPathInvalid; ^
Error: ApiMailAdapter: template content path is invalid. at Function.get (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\Errors.js:62:37) at ApiMailAdapter._validateTemplate (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:601:22) at new ApiMailAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server-api-mail-adapter\lib\ApiMailAdapter.js:83:13) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:35:16) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:48:12) at loadAdapter (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Adapters\AdapterLoader.js:50:12) at getUserController (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Controllers\index.js:169:65) at Object.getControllers (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\Controllers\index.js:81:26) at new ParseServer (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\ParseServer.js:110:40) at new _ParseServer (E:\tiavina-mika\portfolio-v3\node_modules\parse-server\lib\index.js:92:18) [nodemon] app crashed - waiting for file changes before starting...