diff options
author | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-04-28 20:55:23 +0900 |
---|---|---|
committer | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-04-28 20:55:23 +0900 |
commit | 9f0c750c05a6ae53a00e7f238b9b1610f3dc05c6 (patch) | |
tree | c6c4f19e6590335c0ea05d036478d6b17f4fe50c | |
parent | 9e0ed0117fe8ea85417416a4e327babd3f506df2 (diff) | |
parent | d1c2dcd357b88923aaa651025e76efd0fcc65b74 (diff) |
Merge branch 'feature/localization-again' of https://github.com/dinoue/gathio into feature/localization-again
-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); |