mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
added support for imap 'autotls' option to 'email in' node (#796)
* added support for imap 'autotls' option to 'email in' node
This commit is contained in:
parent
8412beedf2
commit
13d534ee54
@ -126,6 +126,14 @@
|
|||||||
<label for="node-input-useSSL"><i class="fa fa-lock"></i> <span data-i18n="email.label.useSSL"></span></label>
|
<label for="node-input-useSSL"><i class="fa fa-lock"></i> <span data-i18n="email.label.useSSL"></span></label>
|
||||||
<input type="checkbox" id="node-input-useSSL" style="width: auto;">
|
<input type="checkbox" id="node-input-useSSL" style="width: auto;">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<label for="node-input-autotls"><i class="fa fa-lock"></i> <span data-i18n="email.label.autotls"></label>
|
||||||
|
<select type="text" id="node-input-autotls" style="width: 150px;">
|
||||||
|
<option value="never" data-i18n="email.label.never">never</option>
|
||||||
|
<option value="always" data-i18n="email.label.always">always</option>
|
||||||
|
<option value="required" data-i18n="email.label.required">required</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-server"><i class="fa fa-globe"></i> <span data-i18n="email.label.server"></span></label>
|
<label for="node-input-server"><i class="fa fa-globe"></i> <span data-i18n="email.label.server"></span></label>
|
||||||
<input type="text" id="node-input-server" placeholder="imap.gmail.com">
|
<input type="text" id="node-input-server" placeholder="imap.gmail.com">
|
||||||
@ -202,10 +210,12 @@
|
|||||||
$("#node-input-protocol").change(function() {
|
$("#node-input-protocol").change(function() {
|
||||||
var protocol = $("#node-input-protocol").val();
|
var protocol = $("#node-input-protocol").val();
|
||||||
if (protocol === "IMAP") {
|
if (protocol === "IMAP") {
|
||||||
|
$(".node-input-autotls").show();
|
||||||
$(".node-input-box").show();
|
$(".node-input-box").show();
|
||||||
$(".node-input-disposition").show();
|
$(".node-input-disposition").show();
|
||||||
$(".node-input-criteria").show();
|
$(".node-input-criteria").show();
|
||||||
} else {
|
} else {
|
||||||
|
$(".node-input-autotls").hide();
|
||||||
$(".node-input-box").hide();
|
$(".node-input-box").hide();
|
||||||
$(".node-input-disposition").hide();
|
$(".node-input-disposition").hide();
|
||||||
$(".node-input-criteria").hide();
|
$(".node-input-criteria").hide();
|
||||||
@ -225,6 +235,7 @@
|
|||||||
protocol: {value: "IMAP", required:true}, // Which protocol to use to connect to the mail server ("IMAP" or "POP3")
|
protocol: {value: "IMAP", required:true}, // Which protocol to use to connect to the mail server ("IMAP" or "POP3")
|
||||||
server: {value:"imap.gmail.com",required:true},
|
server: {value:"imap.gmail.com",required:true},
|
||||||
useSSL: {value: true},
|
useSSL: {value: true},
|
||||||
|
autotls: {value: "never"},
|
||||||
port: {value:"993",required:true},
|
port: {value:"993",required:true},
|
||||||
box: {value:"INBOX"}, // For IMAP, The mailbox to process
|
box: {value:"INBOX"}, // For IMAP, The mailbox to process
|
||||||
disposition: { value: "Read" }, // For IMAP, the disposition of the read email
|
disposition: { value: "Read" }, // For IMAP, the disposition of the read email
|
||||||
|
@ -189,6 +189,7 @@ module.exports = function(RED) {
|
|||||||
this.inport = n.port || (globalkeys && globalkeys.port) || "993";
|
this.inport = n.port || (globalkeys && globalkeys.port) || "993";
|
||||||
this.box = n.box || "INBOX";
|
this.box = n.box || "INBOX";
|
||||||
this.useSSL= n.useSSL;
|
this.useSSL= n.useSSL;
|
||||||
|
this.autotls= n.autotls;
|
||||||
this.protocol = n.protocol || "IMAP";
|
this.protocol = n.protocol || "IMAP";
|
||||||
this.disposition = n.disposition || "None"; // "None", "Delete", "Read"
|
this.disposition = n.disposition || "None"; // "None", "Delete", "Read"
|
||||||
this.criteria = n.criteria || "UNSEEN"; // "ALL", "ANSWERED", "FLAGGED", "SEEN", "UNANSWERED", "UNFLAGGED", "UNSEEN"
|
this.criteria = n.criteria || "UNSEEN"; // "ALL", "ANSWERED", "FLAGGED", "SEEN", "UNANSWERED", "UNFLAGGED", "UNSEEN"
|
||||||
@ -491,6 +492,7 @@ module.exports = function(RED) {
|
|||||||
host: node.inserver,
|
host: node.inserver,
|
||||||
port: node.inport,
|
port: node.inport,
|
||||||
tls: node.useSSL,
|
tls: node.useSSL,
|
||||||
|
autotls: node.autotls,
|
||||||
tlsOptions: { rejectUnauthorized: false },
|
tlsOptions: { rejectUnauthorized: false },
|
||||||
connTimeout: tout,
|
connTimeout: tout,
|
||||||
authTimeout: tout
|
authTimeout: tout
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
<p><b>Hinweis</b>: Bei POP3 sind die Standard-Portnummern 110 für ungesichertes TCP und 995 für SSL. Bei IMAP 143 für ungesichertes TCP und 993 für SSL.</p>
|
<p><b>Hinweis</b>: Bei POP3 sind die Standard-Portnummern 110 für ungesichertes TCP und 995 für SSL. Bei IMAP 143 für ungesichertes TCP und 993 für SSL.</p>
|
||||||
|
<p><b>Hinweis</b>: Mit der Option 'STARTTLS' kann eine bestehende ungesicherte Verbindung zu einer gesicherten geupgraded werden. Die Einstellung 'immer' versucht dies immer, 'wenn erforderlich' wenn es erforderlich ist, und 'nie' gar nicht.</p>
|
||||||
<p><b>Hinweis</b>: Das maximale Aktualisierungsintervall ist 2147483 Sekunden (24,8 Tage).</p>
|
<p><b>Hinweis</b>: Das maximale Aktualisierungsintervall ist 2147483 Sekunden (24,8 Tage).</p>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,6 +16,10 @@
|
|||||||
"folder": "Verzeichnis",
|
"folder": "Verzeichnis",
|
||||||
"protocol": "Protokoll",
|
"protocol": "Protokoll",
|
||||||
"useSSL": "SSL",
|
"useSSL": "SSL",
|
||||||
|
"autotls": "STARTTLS?",
|
||||||
|
"never": "nie",
|
||||||
|
"required": "wenn erforderlich",
|
||||||
|
"always": "immer",
|
||||||
"useTLS": "TLS",
|
"useTLS": "TLS",
|
||||||
"disposition": "Behandlung",
|
"disposition": "Behandlung",
|
||||||
"none": "Keine",
|
"none": "Keine",
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
<p><b>Note</b>: For POP3, the default port numbers are 110 for plain TCP and 995 for SSL. For IMAP the port numbers are 143 for plain TCP and 993 for SSL.</p>
|
<p><b>Note</b>: For POP3, the default port numbers are 110 for plain TCP and 995 for SSL. For IMAP the port numbers are 143 for plain TCP and 993 for SSL.</p>
|
||||||
|
<p><b>Note</b>: With option 'STARTTLS' an established plain connection is upgraded to an encrypted one. Set to 'always' to always attempt connection upgrades via STARTTLS, 'required' only if upgrading is required, or 'never' to never attempt upgrading.</p>
|
||||||
<p><b>Note</b>: The maximum refresh interval is 2147483 seconds (24.8 days).</p>
|
<p><b>Note</b>: The maximum refresh interval is 2147483 seconds (24.8 days).</p>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"folder": "Folder",
|
"folder": "Folder",
|
||||||
"protocol": "Protocol",
|
"protocol": "Protocol",
|
||||||
"useSSL": "Use SSL?",
|
"useSSL": "Use SSL?",
|
||||||
|
"autotls": "STARTTLS?",
|
||||||
"useTLS": "Use TLS?",
|
"useTLS": "Use TLS?",
|
||||||
"disposition": "Disposition",
|
"disposition": "Disposition",
|
||||||
"none": "None",
|
"none": "None",
|
||||||
|
Loading…
Reference in New Issue
Block a user