Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add a one-click helper for Gmail Rely SMTP with `HELO` hostname support. Closes #2544.

Kailash Nadh1c97b35a043f
diff --git a/static/admin/assets/js/views/settings.js b/static/admin/assets/js/views/settings.js
index 686377ad..97e8bb38 100644
--- a/static/admin/assets/js/views/settings.js
+++ b/static/admin/assets/js/views/settings.js
@@ -10,6 +10,7 @@ import * as u from '../utils.js';
// Quick-fill templates for known SMTP providers.
const smtpTemplates = {
gmail: { host: 'smtp.gmail.com', port: 465, auth_protocol: 'login', tls_type: 'TLS' },
+ gmailrelay: { host: 'smtp-relay.gmail.com', port: 465, auth_protocol: 'login', tls_type: 'TLS', hello_hostname: true },
ses: { host: 'email-smtp.YOUR-REGION.amazonaws.com', port: 465, auth_protocol: 'login', tls_type: 'TLS' },
azure: { host: 'smtp.azurecomm.net', port: 587, auth_protocol: 'login', tls_type: 'STARTTLS' },
mailjet: { host: 'in-v3.mailjet.com', port: 465, auth_protocol: 'cram', tls_type: 'TLS' },
@@ -277,7 +278,7 @@ function component(settings, userRoles, listRoles) {
...smtpTemplates[key],
username: '',
password: '',
- hello_hostname: '',
+ hello_hostname: smtpTemplates[key].hello_hostname ? new URL(config.root_url).hostname : '',
tls_skip_verify: false,
};
this.$nextTick(() => document.querySelector(`.smtp-username-${n}`)?.focus());
diff --git a/static/admin/partials/settings/smtp.html b/static/admin/partials/settings/smtp.html
index 1df0d3fb..c66479b0 100644
--- a/static/admin/partials/settings/smtp.html
+++ b/static/admin/partials/settings/smtp.html
@@ -67,6 +67,7 @@
</div>
<div class="hstack text-8">
<a href="#" @click.prevent="fillSMTP(n, 'gmail')">Gmail</a>
+ <a href="#" @click.prevent="fillSMTP(n, 'gmailrelay')">Gmail Relay</a>
<a href="#" @click.prevent="fillSMTP(n, 'ses')">Amazon SES</a>
<a href="#" @click.prevent="fillSMTP(n, 'azure')">Azure ACS</a>
<a href="#" @click.prevent="fillSMTP(n, 'mailgun')">Mailgun</a>