Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
move sendmail path to environment variable
Browse files Browse the repository at this point in the history
move sendmail path to environment variable
  • Loading branch information
mzch committed Oct 1, 2020
1 parent 9933621 commit 269c339
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ PERSISTENT_ALIAS="[email protected]"

SMTP_SERVER_OPTIONS={"banner":"dev.ptorx.com","name":"dev.ptorx.com","size":25000000}

MAIL_CACHE_DIRECTORY="/home/travis/build/xyfir/ptorx/mail-cache"
MAIL_CACHE_DIRECTORY="/home/travis/build/xyfir/ptorx/mail-cache"

SENDMAIL_PATH=sendmail
2 changes: 1 addition & 1 deletion server/lib/mail/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const transporter =
})
: createTransport({
sendmail: true,
path: '/usr/sbin/sendmail'
path: process.enve.SENDMAIL_PATH || 'sendmail'
});

export async function sendMail(
Expand Down
5 changes: 5 additions & 0 deletions types/ptorx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ export namespace Ptorx {
* @example "/path/to/mail-cache"
*/
MAIL_CACHE_DIRECTORY: string;
/**
* Absolute path of sendmail command for outgoing mails.
* @example "/usr/sbin/sendmail"
*/
SENDMAIL_PATH: string;
}

export interface Web extends Ptorx.Env.Common {
Expand Down

0 comments on commit 269c339

Please sign in to comment.