From 4d5eb1c8111e2517c0fcf90826f1b95af5ad2380 Mon Sep 17 00:00:00 2001 From: wooferguy Date: Sat, 11 Feb 2023 14:41:19 +1300 Subject: [PATCH] XOauth2 IMAP Release Prevent XOAuth2 being used for POP. Update PR Template. Updated help file. Bumped version to 1.19-beta --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++- social/email/61-email.html | 4 ++ social/email/61-email.js | 1 + social/email/locales/en-US/61-email.html | 80 ++++++++++++++++-------- social/email/package.json | 2 +- 5 files changed, 63 insertions(+), 31 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 73563b32..9c8cea7f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -26,11 +26,12 @@ the [forum](https://discourse.nodered.org) or Adds authentication option to the Email node (node-red-node-email) to use OAuth and XOAuth2 +********** This version: IMAP ONLY ********** ## Checklist - [x] I have read the [contribution guidelines](https://github.com/node-red/node-red-nodes/blob/master/CONTRIBUTING.md) -- [ ] For non-bugfix PRs, I have discussed this change on the forum/slack team. -- [ ] I have run `grunt` to verify the unit tests pass -- [ ] I have added suitable unit tests to cover the new/changed functionality +- [x] For non-bugfix PRs, I have discussed this change on the forum/slack team. +- [x] I have run `grunt` to verify the unit tests pass +- [x] I have added suitable unit tests to cover the new/changed functionality diff --git a/social/email/61-email.html b/social/email/61-email.html index f486d896..ac48ddd3 100644 --- a/social/email/61-email.html +++ b/social/email/61-email.html @@ -230,6 +230,8 @@ $(".node-input-disposition").show(); $(".node-input-criteria").show(); } else { + $("#node-input-authtype").val("BASIC"); + $("#node-input-authtype").change(); $(".node-input-autotls").hide(); $(".node-input-box").hide(); $(".node-input-disposition").hide(); @@ -248,6 +250,8 @@ $(".node-input-password").hide(); $(".node-input-saslformat").show(); $(".node-input-token").show(); + $("#node-input-protocol").val("IMAP"); //Remove when POP lib updated + $("#node-input-protocol").change(); $("#node-input-fetch").val("trigger"); $("#node-input-fetch").change(); } diff --git a/social/email/61-email.js b/social/email/61-email.js index 84b4e583..275e90e5 100644 --- a/social/email/61-email.js +++ b/social/email/61-email.js @@ -204,6 +204,7 @@ module.exports = function(RED) { if (this.authtype !== "BASIC") { this.inputs = 1; this.repeat = 0; + this.protocol = "IMAP"; } var flag = false; diff --git a/social/email/locales/en-US/61-email.html b/social/email/locales/en-US/61-email.html index 3cef9edb..42341059 100644 --- a/social/email/locales/en-US/61-email.html +++ b/social/email/locales/en-US/61-email.html @@ -25,33 +25,59 @@ diff --git a/social/email/package.json b/social/email/package.json index 2e362d1a..f71a40cc 100644 --- a/social/email/package.json +++ b/social/email/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-email", - "version": "1.18.4", + "version": "1.19.0-beta+xoauth2.imap", "description": "Node-RED nodes to send and receive simple emails.", "dependencies": { "imap": "^0.8.19",