diff --git a/Envfile b/Envfile
index 0e306d2a4..bcddf4ad4 100644
--- a/Envfile
+++ b/Envfile
@@ -21,6 +21,9 @@ variable :LOGO_SVG, :String, default: ""
# Default staff account's id
variable :DEVTO_USER_ID, :Integer, default: 1
+# Default site email
+variable :DEFAULT_SITE_EMAIL, :String, default: "yo@dev.to"
+
# Service timeout length
variable :RACK_TIMEOUT_WAIT_TIMEOUT, :Integer, default: 100_000
variable :RACK_TIMEOUT_SERVICE_TIMEOUT, :Integer, default: 100_000
diff --git a/app/controllers/api_secrets_controller.rb b/app/controllers/api_secrets_controller.rb
index ecddae27f..4f5af78b7 100644
--- a/app/controllers/api_secrets_controller.rb
+++ b/app/controllers/api_secrets_controller.rb
@@ -23,7 +23,7 @@ class ApiSecretsController < ApplicationController
if @secret.destroy
flash[:notice] = "Your API Key has been revoked."
else
- flash[:error] = "An error occurred. Please try again or send an email to: yo@dev.to"
+ flash[:error] = "An error occurred. Please try again or send an email to: #{ApplicationConfig['DEFAULT_SITE_EMAIL']}"
end
redirect_back(fallback_location: root_path)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 0726e37e7..fd15b5697 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -94,7 +94,7 @@ class UsersController < ApplicationController
flash[:settings_notice] = "Your #{provider.capitalize} account was successfully removed."
else
- flash[:error] = "An error occurred. Please try again or send an email to: yo@dev.to"
+ flash[:error] = "An error occurred. Please try again or send an email to: #{ApplicationConfig['DEFAULT_SITE_EMAIL']}"
end
redirect_to "/settings/#{@tab}"
end
diff --git a/app/labor/error_message_cleaner.rb b/app/labor/error_message_cleaner.rb
index 99163c3dd..bcef73b23 100644
--- a/app/labor/error_message_cleaner.rb
+++ b/app/labor/error_message_cleaner.rb
@@ -7,7 +7,7 @@ class ErrorMessageCleaner
def clean
if error_message.include? "expected key while parsing a block mapping at line"
- "There was a problem parsing the front-matter YAML. Perhaps you need to escape a quote or a colon or something. Email yo@dev.to if you are having trouble."
+ "There was a problem parsing the front-matter YAML. Perhaps you need to escape a quote or a colon or something. Email #{ApplicationConfig['DEFAULT_SITE_EMAIL']} if you are having trouble."
else
error_message
end
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb
index fc8da1928..bec34766e 100644
--- a/app/mailers/application_mailer.rb
+++ b/app/mailers/application_mailer.rb
@@ -1,5 +1,5 @@
class ApplicationMailer < ActionMailer::Base
- default from: "DEV Community
- Questions? Send an email to yo@dev.to
+ Questions? Send an email to "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %>
<% end %>
- Please try again below, or contact yo@dev.to if this persists.
+ Please try again below, or contact "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if this persists.
<% end %>
diff --git a/app/views/feedback_messages/index.html.erb b/app/views/feedback_messages/index.html.erb
index 71ca4523c..5c0ae5384 100644
--- a/app/views/feedback_messages/index.html.erb
+++ b/app/views/feedback_messages/index.html.erb
@@ -4,7 +4,7 @@
Thank you for your report.
Return to home page
- Contact us at yo@dev.to if there is anything more we can help with. 😊 + Contact us at "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if there is anything more we can help with. 😊
diff --git a/app/views/mailers/notify_mailer/account_deleted_email.text.erb b/app/views/mailers/notify_mailer/account_deleted_email.text.erb index 7f3b3a3a3..456c1891e 100644 --- a/app/views/mailers/notify_mailer/account_deleted_email.text.erb +++ b/app/views/mailers/notify_mailer/account_deleted_email.text.erb @@ -1,6 +1,6 @@ Hi <%= @name %>, your account has been successfully deleted. -Contact us at yo@dev.to if there is anything more we can help with. +Contact us at <%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if there is anything more we can help with. Thanks, The DEV Team diff --git a/app/views/moderations/index.html.erb b/app/views/moderations/index.html.erb index 44b11fee0..8544a8a40 100644 --- a/app/views/moderations/index.html.erb +++ b/app/views/moderations/index.html.erb @@ -111,8 +111,8 @@ <%= HTML_Truncator.truncate( article.processed_html, 200, - ellipsis: '... Read Entire Post').html_safe - %> + ellipsis: '... Read Entire Post', + ).html_safe %>
We periodically award some DEV members with heightened privileges to help moderate the community.
-Email yo@dev.to if you'd like to be considered right away.
+Email "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if you'd like to be considered right away.
<% if !user_signed_in? %>P.S. You are not currently signed in.
<% end %> diff --git a/app/views/notifications/_notifications_list.html.erb b/app/views/notifications/_notifications_list.html.erb index 7924d6196..d8e064588 100644 --- a/app/views/notifications/_notifications_list.html.erb +++ b/app/views/notifications/_notifications_list.html.erb @@ -14,7 +14,7 @@ other popular tags which may be more appropriate.- Email: yo@dev.to 😁 + Email: "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> 😁
Twitter: ">@<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %> 👻 diff --git a/app/views/pages/swagnets.html.erb b/app/views/pages/swagnets.html.erb index bcfe62042..4297a4edb 100644 --- a/app/views/pages/swagnets.html.erb +++ b/app/views/pages/swagnets.html.erb @@ -25,7 +25,7 @@
We understand that some of you won't have a device that supports your new Swagnet, but we hope that you have a friend who can enjoy it :)
By the way, you can also buy Swagnets that benefit open-source projects: you can check those out
here.
Comments? Suggestions? Ping us on Twitter or at
- yo@dev.to.
If you know of a great dev podcast that should be added to this list, contact yo@dev.to
+If you know of a great dev podcast that should be added to this list, contact "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %>
<% elsif @podcast %> diff --git a/app/views/users/_account.html.erb b/app/views/users/_account.html.erb index c48509668..09b532e6c 100644 --- a/app/views/users/_account.html.erb +++ b/app/views/users/_account.html.erb @@ -148,7 +148,7 @@Your feed will be fetched every time you submit this form and updates will be automatically fetched periodically thereafter. Contact - yo@dev.to if you encounter issues. + "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if you encounter issues.
FYI: Medium RSS feed URLs are https://medium.com/feed/@your_username diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index ca3be3563..c070ae900 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -15,7 +15,7 @@ <% if params[:state] == "previous-registration" %>
- Video is beta: Email yo@dev.to if you have any problems. + Video is beta: Email "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %> if you have any problems.
- If you see too many of these, please report it to yo@dev.to! + If you see too many of these, please report it to "><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %>!