[bbb-greenlight: 17/39] Allow customization of test email recipient (#2107)
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bbb-greenlight: 17/39] Allow customization of test email recipient (#2107)
- Date: Thu, 15 Oct 2020 07:11:22 +0000 (UTC)
commit 5a38ae488ef0a19be892d58f2768155083f610fc
Author: Jordi Molina <warp3r 2shifted com>
Date: Tue Sep 22 17:03:47 2020 +0200
Allow customization of test email recipient (#2107)
* Update configuration.rake
use env variable SMTP_TEST_RECIPIENT so customers using mail providers like Microsoft can specify RFC
2606 compliant destination test recipients
* add SMTP_TEST_RECIPIENT to sample.env
add SMTP_TEST_RECIPIENT to sample.env with default value to ensure retro compatibility
* default to notifications example com
default to notifications example com should SMTP_TEST_RECIPIENT not be defined
Co-authored-by: Ahmad Farhat <ahmad af farhat gmail com>
lib/tasks/configuration.rake | 2 +-
sample.env | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/tasks/configuration.rake b/lib/tasks/configuration.rake
index f120355..d3883ed 100644
--- a/lib/tasks/configuration.rake
+++ b/lib/tasks/configuration.rake
@@ -49,7 +49,7 @@ def test_smtp
authtype = ENV['SMTP_AUTH'].present? && ENV['SMTP_AUTH'] != "none" ? ENV['SMTP_AUTH'] : nil
smtp.start(ENV['SMTP_DOMAIN'], user, password, authtype) do |s|
- s.sendmail('test', ENV['SMTP_USERNAME'], 'notifications example com')
+ s.sendmail('test', ENV['SMTP_USERNAME'], ENV.fetch('SMTP_TEST_RECIPIENT', 'notifications example com'))
end
rescue => e
failed("Error connecting to SMTP - #{e}")
diff --git a/sample.env b/sample.env
index 4a7d74b..dd469e1 100644
--- a/sample.env
+++ b/sample.env
@@ -138,6 +138,10 @@ SMTP_STARTTLS_AUTO=
# Specify the email address that all mail is sent from
SMTP_SENDER=
+# Specify the recipient for test emails (needed for providers like Microsoft, who are very
+# strict about RFC 2606)
+SMTP_TEST_RECIPIENT=notifications example com
+
# Prefix for the applications root URL.
# Useful for deploying the application to a subdirectory, which is highly recommended
# if deploying on a BigBlueButton server. Keep in mind that if you change this, you'll
@@ -282,4 +286,4 @@ DEFAULT_REGISTRATION=open
# GCS_CLIENT_ID=
# GCS_CLIENT_CERT=
# GCS_PROJECT=
-# GCS_BUCKET=
\ No newline at end of file
+# GCS_BUCKET=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]