Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a090186c54 | ||
|
|
9c948f1f3e | ||
|
|
ee0c106a2c | ||
|
|
2f095b79c5 |
|
|
@ -42,3 +42,8 @@ deno install \
|
|||
# OR
|
||||
./cohamail <subcommand> -h
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
You can override default config and templates with your own in
|
||||
`/etc/cohabit/mailer/(config|templates)/`.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ for (const template of Object.values(defaultTemplates)) {
|
|||
}
|
||||
|
||||
//Load local templates
|
||||
const basePath = '/etc/cohabit/mailer'
|
||||
const basePath = '/etc/cohabit/mailer/templates'
|
||||
|
||||
if (await exists(basePath)) {
|
||||
for await (const template of Deno.readDir(basePath)) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ async function readJsonFile<
|
|||
return { ...defaultValue, ...json }
|
||||
}
|
||||
|
||||
const basePath = '/ect/cohabit/mailer'
|
||||
const basePath = '/ect/cohabit/mailer/config'
|
||||
|
||||
export const accounts = await readJsonFile<AccountRecord>(
|
||||
`${basePath}/account.json`,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@cohabit/mailer",
|
||||
"version": "0.3.3",
|
||||
"version": "0.5.2",
|
||||
"exports": {
|
||||
".": "./mod.ts",
|
||||
"./cli": "./cli.ts",
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
"./templates": "./templates/mod.ts"
|
||||
},
|
||||
"tasks": {
|
||||
"compile": "deno compile --allow-read --allow-env --allow-net=0.0.0.0 --allow-sys=osRelease,networkInterfaces --allow-run=/usr/sbin/sendmail,whoami --output=bin/mailer --target=x86_64-unknown-linux-gnu ./cli.ts",
|
||||
"cli": "deno run --allow-read --allow-env --allow-net=0.0.0.0 --allow-sys=osRelease,networkInterfaces --allow-run=/usr/sbin/sendmail,whoami ./cli.ts"
|
||||
"compile": "deno compile --allow-read --allow-env --allow-net=0.0.0.0,jsr.io --allow-sys=osRelease,networkInterfaces --allow-run=/usr/sbin/sendmail,whoami --output=bin/mailer --target=x86_64-unknown-linux-gnu ./cli.ts",
|
||||
"cli": "deno run --allow-read --allow-env --allow-net=0.0.0.0,jsr.io --allow-sys=osRelease,networkInterfaces --allow-run=/usr/sbin/sendmail,whoami ./cli.ts"
|
||||
},
|
||||
"fmt": {
|
||||
"singleQuote": true,
|
||||
|
|
@ -31,5 +31,6 @@
|
|||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact"
|
||||
}
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue