diff --git a/frontend/src/assets/style.scss b/frontend/src/assets/style.scss
index 6973d19a..856241ad 100644
--- a/frontend/src/assets/style.scss
+++ b/frontend/src/assets/style.scss
@@ -828,6 +828,10 @@ section.analytics {
height: auto;
min-height: 350px;
}
+ .smtp-shortcuts a {
+ margin-right: 15px;
+ display: inline-block;
+ }
}
/* Logs */
@@ -1034,6 +1038,10 @@ section.analytics {
.page-header .buttons {
display: block;
}
+
+ .b-tabs .tab-content {
+ padding: 15px 0 0 0;
+ }
}
/* On big sizes, keep the header buttons small and non-expanded. */
diff --git a/frontend/src/views/settings/smtp.vue b/frontend/src/views/settings/smtp.vue
index 7128ff10..dd764efb 100644
--- a/frontend/src/views/settings/smtp.vue
+++ b/frontend/src/views/settings/smtp.vue
@@ -52,7 +52,7 @@
-
@@ -68,6 +68,15 @@
+
@@ -205,6 +214,27 @@ import Vue from 'vue';
import { mapState } from 'vuex';
import { regDuration } from '../../constants';
+const smtpTemplates = {
+ gmail: {
+ host: 'smtp.gmail.com', port: 465, auth_protocol: 'login', tls_type: 'TLS',
+ },
+ ses: {
+ host: 'email-smtp.YOUR-REGION.amazonaws.com', port: 465, auth_protocol: 'login', tls_type: 'TLS',
+ },
+ mailjet: {
+ host: 'in-v3.mailjet.com', port: 465, auth_protocol: 'cram', tls_type: 'TLS',
+ },
+ mailgun: {
+ host: 'smtp.mailgun.org', port: 465, auth_protocol: 'login', tls_type: 'TLS',
+ },
+ sendgrid: {
+ host: 'smtp.sendgrid.net', port: 465, auth_protocol: 'login', tls_type: 'TLS',
+ },
+ postmark: {
+ host: 'smtp.postmarkapp.com', port: 587, auth_protocol: 'cram', tls_type: 'STARTTLS',
+ },
+};
+
export default Vue.extend({
props: {
form: {
@@ -297,6 +327,21 @@ export default Vue.extend({
return false;
},
+
+ fillSettings(n, key) {
+ this.data.smtp.splice(n, 1, {
+ ...this.data.smtp[n],
+ ...smtpTemplates[key],
+ username: '',
+ password: '',
+ hello_hostname: '',
+ tls_skip_verify: false,
+ });
+
+ this.$nextTick(() => {
+ document.querySelector(`.smtp-username-${n}`).focus();
+ });
+ },
},
computed: {