Compare commits

..

4 commits
0.4.1 ... main

4 changed files with 12 additions and 6 deletions

View file

@ -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)/`.

View file

@ -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)) {

View file

@ -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`,

View file

@ -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"
}