mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Allow sending group SMTP emails with from alias (#15687)
This commit allows group SMTP emails to be sent with a different from email address that has been set up as an alias in the email provider. Emails from the alias will be grouped correctly using Message-IDs in the mail client, and replies to the alias go into the correct group inbox.
This commit is contained in:
@@ -37,6 +37,7 @@ export default Component.extend({
|
||||
EmberObject.create({
|
||||
email_username: this.group.email_username,
|
||||
email_password: this.group.email_password,
|
||||
email_from_alias: this.group.email_from_alias,
|
||||
smtp_server: this.group.smtp_server,
|
||||
smtp_port: (this.group.smtp_port || "").toString(),
|
||||
smtp_ssl: this.group.smtp_ssl,
|
||||
@@ -73,6 +74,7 @@ export default Component.extend({
|
||||
smtp_port: this.form.smtp_port,
|
||||
smtp_ssl: this.form.smtp_ssl,
|
||||
email_username: this.form.email_username,
|
||||
email_from_alias: this.form.email_from_alias,
|
||||
email_password: this.form.email_password,
|
||||
});
|
||||
})
|
||||
|
||||
@@ -243,6 +243,7 @@ const Group = RestModel.extend({
|
||||
imap_mailbox_name: this.imap_mailbox_name,
|
||||
imap_enabled: this.imap_enabled,
|
||||
email_username: this.email_username,
|
||||
email_from_alias: this.email_from_alias,
|
||||
email_password: this.email_password,
|
||||
flair_icon: null,
|
||||
flair_upload_id: null,
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
</div>
|
||||
|
||||
<br>
|
||||
{{group-manage-save-button model=group disabled=(not emailSettingsValid) beforeSave=beforeSave afterSave=afterSave tabindex="14"}}
|
||||
{{group-manage-save-button model=group disabled=(not emailSettingsValid) beforeSave=beforeSave afterSave=afterSave tabindex="15"}}
|
||||
</div>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
<div class="control-group">
|
||||
<label for="smtp_server">{{i18n "groups.manage.email.credentials.smtp_server"}}</label>
|
||||
{{input type="text" name="smtp_server" value=form.smtp_server tabindex="3" onChange=(action "resetSettingsValid")}}
|
||||
{{input type="text" name="smtp_server" value=form.smtp_server tabindex="4" onChange=(action "resetSettingsValid")}}
|
||||
</div>
|
||||
|
||||
<label for="enable_ssl">
|
||||
{{input type="checkbox" checked=form.smtp_ssl id="enable_ssl" tabindex="5" onChange=(action "resetSettingsValid")}}
|
||||
{{input type="checkbox" checked=form.smtp_ssl id="enable_ssl" tabindex="6" onChange=(action "resetSettingsValid")}}
|
||||
{{i18n "groups.manage.email.credentials.smtp_ssl"}}
|
||||
</label>
|
||||
</div>
|
||||
@@ -25,7 +25,15 @@
|
||||
|
||||
<div class="control-group">
|
||||
<label for="smtp_port">{{i18n "groups.manage.email.credentials.smtp_port"}}</label>
|
||||
{{input type="text" name="smtp_port" value=form.smtp_port tabindex="4" onChange=(action "resetSettingsValid" form.smtp_port)}}
|
||||
{{input type="text" name="smtp_port" value=form.smtp_port tabindex="5" onChange=(action "resetSettingsValid" form.smtp_port)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="control-group">
|
||||
<label for="from_alias">{{i18n "groups.manage.email.settings.from_alias"}}</label>
|
||||
{{input type="text" name="from_alias" id="from_alias" value=form.email_from_alias onChange=(action "resetSettingsValid") tabindex="3"}}
|
||||
<p>{{i18n "groups.manage.email.settings.from_alias_hint"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -43,7 +51,7 @@
|
||||
action=(action "testSmtpSettings")
|
||||
icon="cog"
|
||||
label="groups.manage.email.test_settings"
|
||||
tabindex="6"
|
||||
tabindex="7"
|
||||
title="groups.manage.email.settings_required"
|
||||
}}
|
||||
|
||||
|
||||
@@ -106,6 +106,8 @@ acceptance(
|
||||
|
||||
await fillIn('input[name="username"]', "myusername@gmail.com");
|
||||
await fillIn('input[name="password"]', "password@gmail.com");
|
||||
await fillIn("#from_alias", "akasomegroup@example.com");
|
||||
|
||||
await click(".test-smtp-settings");
|
||||
|
||||
assert.ok(exists(".smtp-settings-ok"), "tested settings are ok");
|
||||
|
||||
Reference in New Issue
Block a user