mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Smtp server security note and hide unrelevant fields (#924)
* Email Mta Node added security and authentication * Documentation updated * Original formatting restored * email-mta added note for port security hide fields when not relevant
This commit is contained in:
		| @@ -316,19 +316,18 @@ | |||||||
|         <input type="checkbox" id="node-input-starttls" style="display:inline-block; width:20px; vertical-align:baseline;"> |         <input type="checkbox" id="node-input-starttls" style="display:inline-block; width:20px; vertical-align:baseline;"> | ||||||
|         <span data-i18n="email.label.starttlsUpgrade"></span> |         <span data-i18n="email.label.starttlsUpgrade"></span> | ||||||
|     </div>      |     </div>      | ||||||
|     <div class="form-row"> |     <div class="form-row" id="certRow"> | ||||||
|         <label for="node-input-certFile"><i class="fa fa-file"></i> |         <label for="node-input-certFile"><i class="fa fa-file"></i> | ||||||
|         <span data-i18n="email.label.certFile"></span></label> |         <span data-i18n="email.label.certFile"></span></label> | ||||||
|         <input type="text" id="node-input-certFile" placeholder="server.crt" style="width:100%"> |         <input type="text" id="node-input-certFile" placeholder="server.crt" style="width:100%"> | ||||||
|     </div>   |     </div>   | ||||||
|     <div class="form-row"> |     <div class="form-row" id="keyRow"> | ||||||
|         <label for="node-input-keyFile"><i class="fa fa-key"></i> |         <label for="node-input-keyFile"><i class="fa fa-key"></i> | ||||||
|         <span data-i18n="email.label.keyFile"></span></label> |         <span data-i18n="email.label.keyFile"></span></label> | ||||||
|         <input type="text" id="node-input-keyFile" placeholder="private.key" style="width:100%"> |         <input type="text" id="node-input-keyFile" placeholder="private.key" style="width:100%"> | ||||||
|     </div>        |     </div>        | ||||||
|     <div class="form-row"> |     <div class="form-row"> | ||||||
|         <label for="node-input-auth"><i class="fa fa-user"></i> <span data-i18n="email.label.users"></span></label> |         <label for="node-input-auth"><i class="fa fa-user"></i> <span data-i18n="email.label.users"></span></label> | ||||||
|         <label style="width:144px"> </label> |  | ||||||
|         <input type="checkbox" id="node-input-auth" style="display:inline-block; width:20px; vertical-align:baseline;"> |         <input type="checkbox" id="node-input-auth" style="display:inline-block; width:20px; vertical-align:baseline;"> | ||||||
|         <span data-i18n="email.label.auth"></span> |         <span data-i18n="email.label.auth"></span> | ||||||
|     </div> |     </div> | ||||||
| @@ -382,11 +381,18 @@ | |||||||
|         }, |         }, | ||||||
|         oneditprepare: function () { |         oneditprepare: function () { | ||||||
|             let node = this; |             let node = this; | ||||||
|             // Expert settings |             // Certificate settings | ||||||
|             $("#node-input-expert").typedInput({ |             $("#node-input-secure").change(secVisibility); | ||||||
|                 type: "json", |             $("#node-input-starttls").change(secVisibility); | ||||||
|                 types: ["json"] |             function secVisibility() { | ||||||
|             }) |                 if ($("#node-input-secure").is(":checked") || $("#node-input-starttls").is(":checked")) { | ||||||
|  |                     $("#certRow").show(); | ||||||
|  |                     $("#keyRow").show(); | ||||||
|  |                 } else { | ||||||
|  |                     $("#certRow").hide(); | ||||||
|  |                     $("#keyRow").hide(); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|             // User Management |             // User Management | ||||||
|             let cacheItemCount = 0; |             let cacheItemCount = 0; | ||||||
|             if (node.users && node.users.length > 0) { |             if (node.users && node.users.length > 0) { | ||||||
| @@ -461,7 +467,21 @@ | |||||||
|                 $("#node-input-email-users-container-div").scrollTop( |                 $("#node-input-email-users-container-div").scrollTop( | ||||||
|                     $("#node-input-email-users-container-div").get(0).scrollHeight |                     $("#node-input-email-users-container-div").get(0).scrollHeight | ||||||
|                 ); |                 ); | ||||||
|             }); |             });  | ||||||
|  |             $("#node-input-auth").change(function () { | ||||||
|  |                 if ($("#node-input-auth").is(":checked")) { | ||||||
|  |                     $("#node-input-email-users-add").show(); | ||||||
|  |                     $("#node-input-email-users-container-div").show(); | ||||||
|  |                 } else { | ||||||
|  |                     $("#node-input-email-users-add").hide(); | ||||||
|  |                     $("#node-input-email-users-container-div").hide(); | ||||||
|  |                 } | ||||||
|  |             });    | ||||||
|  |             // Expert settings | ||||||
|  |             $("#node-input-expert").typedInput({ | ||||||
|  |                 type: "json", | ||||||
|  |                 types: ["json"] | ||||||
|  |             })                               | ||||||
|         }, |         }, | ||||||
|         oneditsave: function () { |         oneditsave: function () { | ||||||
|             let node = this; |             let node = this; | ||||||
|   | |||||||
| @@ -68,7 +68,8 @@ | |||||||
|     <h3>Security</h3> |     <h3>Security</h3> | ||||||
|     <p>When <i>Secure connection</i> is checked, the connection will use TLS.  |     <p>When <i>Secure connection</i> is checked, the connection will use TLS.  | ||||||
|     If not it is still possible to upgrade clear text socket to TLS socket by checking <i>Start TLS</i>. |     If not it is still possible to upgrade clear text socket to TLS socket by checking <i>Start TLS</i>. | ||||||
|     If you do no specify your own certificate (path to file) then a pregenerated self-signed certificate is used. Any respectful client refuses to accept such certificate.</p> |     In most cases when using port 465, check <i>Secure connection</i>. For port 587 or 25 keep it disabled, use <i>Start TLS</i> instead.</p> | ||||||
|  |     <p>If you do no specify your own certificate (path to file) then a pregenerated self-signed certificate is used. Any respectful client refuses to accept such certificate.</p> | ||||||
|     <h3>Authentication</h3> |     <h3>Authentication</h3> | ||||||
|     <p>Authentication can be enabled (PLAIN or LOGIN). Add at least one user.</p> |     <p>Authentication can be enabled (PLAIN or LOGIN). Add at least one user.</p> | ||||||
|     <h3>Expert</h3> |     <h3>Expert</h3> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user