diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 150a45a..eb94d72 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: "info@webdev.camp" , bcc: "info@webdev.camp" + default from: "admission@webdev.camp" , bcc: "admission@webdev.camp" layout 'mailer' end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index ae637b3..f9b5a82 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -12,7 +12,7 @@ Devise.setup do |config| # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class # with default "from" parameter. - config.mailer_sender = 'info@' + Rails.application.secrets.domain_name + config.mailer_sender = 'admission@' + Rails.application.secrets.domain_name # Configure the class responsible to send e-mails. # config.mailer = 'Devise::Mailer' diff --git a/config/secrets.yml.dev b/config/secrets.yml.dev index f99cdf5..b28dfc7 100644 --- a/config/secrets.yml.dev +++ b/config/secrets.yml.dev @@ -12,14 +12,14 @@ development: admin_name: First User - admin_email: info@webdev.camp + admin_email: admission@webdev.camp admin_pass: password domain_name: webdev.camp secret_key_base: 6fbc7972b587359c086a6c6738dca91a5cd53f635bdfba31c7b23721a27e1d89bf8c490dfc3ebe773bcdb98d2add0946ea924321bad66499b893d88fc827b883 test: admin_name: First User - admin_email: info@webdev.camp + admin_email: admission@webdev.camp admin_pass: password domain_name: webdev.camp secret_key_base: a0a18747d0172bfadf4187e6c01be490f452539aeaa4d74bada88ef851d7a2dfabcde91552d3689e9eb71caf9062e5d8b28fbeb55c6f429d92d462655c25d60c diff --git a/spec/mailers/apply_spec.rb b/spec/mailers/apply_spec.rb index e429b62..e6fde42 100644 --- a/spec/mailers/apply_spec.rb +++ b/spec/mailers/apply_spec.rb @@ -7,7 +7,7 @@ RSpec.describe ApplyMailer, type: :mailer do it "renders the headers" do expect(mail.subject).to match("submitted") expect(mail.to).to eq(["test@example.com"]) - expect(mail.from).to eq(["info@webdev.camp"]) + expect(mail.from).to eq(["admission@webdev.camp"]) end it "renders the body" do @@ -21,8 +21,8 @@ RSpec.describe ApplyMailer, type: :mailer do it "renders the headers" do expect(mail.subject).to match("cancelled") expect(mail.to).to eq(["test@example.com"]) - expect(mail.bcc).to eq(["info@webdev.camp"]) - expect(mail.from).to eq(["info@webdev.camp"]) + expect(mail.bcc).to eq(["admission@webdev.camp"]) + expect(mail.from).to eq(["admission@webdev.camp"]) end it "renders the body" do