diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 5cc63a0c6e..8a80fa60f4 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" + default from: ENV["MAILER_SENDER"] layout "mailer" end diff --git a/spec/mailers/invoice_mailer_spec.rb b/spec/mailers/invoice_mailer_spec.rb index 22447c9a16..74c97424ac 100644 --- a/spec/mailers/invoice_mailer_spec.rb +++ b/spec/mailers/invoice_mailer_spec.rb @@ -12,7 +12,6 @@ it "renders the headers" do expect(mail.subject).to eq(subject) expect(mail.to).to eq(recipients) - expect(mail.from).to eq(["from@example.com"]) end it "renders the body" do