diff --git a/index.js b/index.js index e5be56f..9859d54 100644 --- a/index.js +++ b/index.js @@ -54,6 +54,10 @@ function *autodiscover() { const popenc = settings.pop.socket === "STARTTLS" ? "TLS" : settings.pop.socket; const smtpenc = settings.smtp.socket === "STARTTLS" ? "TLS" : settings.smtp.socket; + const imapssl = settings.imap.socket === "SSL" ? "on" : "off"; + const popssl = settings.pop.socket === "SSL" ? "on" : "off"; + const smtpssl = settings.smtp.socket === "SSL" ? "on" : "off"; + yield this.render("autodiscover", { schema: xmlns, email, @@ -61,7 +65,10 @@ function *autodiscover() { domain, imapenc, popenc, - smtpenc + smtpenc, + imapssl, + popssl, + smtpssl }); } diff --git a/views/autodiscover.xml b/views/autodiscover.xml index a1c3e29..dfd75dd 100644 --- a/views/autodiscover.xml +++ b/views/autodiscover.xml @@ -1,97 +1,71 @@ - - - - {{info.name}} Email - - - {%- if imap.host %} - - email - settings - {{info.url}} - - - IMAP - 1 - - {{imap.host}} - {{imap.port}} - - {{email}} - - on - {{domain}} - - off - {{imapenc}} - on - - - {% endif -%} - - {%- if pop.host %} - - email - settings - {{info.url}} - - - POP - 1 - - {{pop.host}} - {{pop.port}} - - {{email}} - - on - {{domain}} - - off - {{popenc}} - on - - - {% endif -%} - - {%- if smtp.host %} - - email - settings - {{info.url}} - - - SMTP - 1 - - {{smtp.host}} - {{smtp.port}} - - {{email}} - - on - {{domain}} - - off - {{smtpenc}} - on - - - {% endif -%} - - {%- if mobilesync.url %} - - - - MobileSync - {{mobilesync.url}} - {%- if mobilesync.name %} - {{mobilesync.name}} - {% endif -%} - - - - {% endif -%} - + + + + {{info.name}} + + + email + settings + {{info.url}} + {%- if imap.host %} + + IMAP + {{imap.host}} + {{imap.port}} + {{email}} + on + {{domain}} + on + {{imapssl}} + {{imapenc}} + on + + {% endif -%} + + {%- if pop.host %} + + POP + {{pop.host}} + {{pop.port}} + {{email}} + on + {{domain}} + on + {{popssl}} + {{popenc}} + on + + {% endif -%} + {%- if smtp.host %} + + SMTP + {{smtp.host}} + {{smtp.port}} + {{email}} + on + {{domain}} + on + {{smtpssl}} + {{smtpenc}} + on + + {% endif -%} + + {%- if mobilesync.url %} + + + + MobileSync + {{mobilesync.url}} + {%- if mobilesync.name %} + {{mobilesync.name}} + {% endif -%} + + + + {% endif -%} +