mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 18:34:09 +08:00
48d13cb231
Our old group SMTP SSL option was a checkbox, but this was not ideal because there are actually 3 different ways SSL can be used when sending SMTP: * None * SSL/TLS * STARTTLS We got around this before with specific overrides for Gmail, but it's not flexible enough and now people want to use other providers. It's best to be clear, though it is a technical detail. We provide a way to test the SMTP settings before saving them so there should be little chance of messing this up. This commit also converts GroupEmailSettings to a glimmer component.
34 lines
834 B
Ruby
34 lines
834 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:group) { name { sequence(:name) { |n| "my_group_#{n}" } } }
|
|
|
|
Fabricator(:public_group, from: :group) do
|
|
public_admission true
|
|
public_exit true
|
|
end
|
|
|
|
Fabricator(:imap_group, from: :group) do
|
|
smtp_server "smtp.ponyexpress.com"
|
|
smtp_port 587
|
|
smtp_ssl_mode Group.smtp_ssl_modes[:starttls]
|
|
smtp_enabled true
|
|
imap_server "imap.ponyexpress.com"
|
|
imap_port 993
|
|
imap_ssl true
|
|
imap_mailbox_name "All Mail"
|
|
imap_uid_validity 0
|
|
imap_last_uid 0
|
|
imap_enabled true
|
|
email_username "discourseteam@ponyexpress.com"
|
|
email_password "test"
|
|
end
|
|
|
|
Fabricator(:smtp_group, from: :group) do
|
|
smtp_server "smtp.ponyexpress.com"
|
|
smtp_port 587
|
|
smtp_ssl_mode Group.smtp_ssl_modes[:starttls]
|
|
smtp_enabled true
|
|
email_username "discourseteam@ponyexpress.com"
|
|
email_password "test"
|
|
end
|