diff options
| -rw-r--r-- | .github/workflows/deploy.yaml | 4 | ||||
| -rwxr-xr-x | src/routes.js | 11 | 
2 files changed, 8 insertions, 7 deletions
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9b11022..1d0330a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,9 +12,9 @@ jobs:              - name: Set up known_hosts file                run: |                    mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts -                  ssh-keyscan -t rsa ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts +                  ssh-keyscan ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts -            - uses: webfactory/ssh-agent@v0.7.0 +            - uses: webfactory/ssh-agent@v0.9.1                with:                    ssh-private-key: ${{ secrets.SSH_KEY }} diff --git a/src/routes.js b/src/routes.js index 23959dd..b85452f 100755 --- a/src/routes.js +++ b/src/routes.js @@ -53,19 +53,20 @@ if (config.general.mail_service) {              sendEmails = true;              break;          case "nodemailer": -            nodemailerTransporter = nodemailer.createTransport({ +            const nodemailerConfig = {                  host: config.nodemailer?.smtp_server, -                port: config.nodemailer?.smtp_port, -                secure: false, // true for 465, false for other ports -            }); +                port: Number(config.nodemailer?.smtp_port) || 587, +            };              if (config.nodemailer?.smtp_username) { -                nodemailerTransporter.auth = { +                nodemailerConfig.auth = {                      user: config.nodemailer?.smtp_username,                      pass: config.nodemailer?.smtp_password                  };              } +            nodemailerTransporter = nodemailer.createTransport(nodemailerConfig); +              nodemailerTransporter.verify((error, success) => {                  if (error) {                      console.log(error);  | 
