如下代码所示,收件人的邮件是硬编码的,如何在环境变量中设置它们
Example::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
email_prefix: "[Error] ",
sender_address: %{"Exception Notifier" <exception@example.com>},
exception_recipients: %w{example@example.com example2@example.com}
}
我试过exception_recipients: ENV['mail']
%w{ENV['mail']}
"%w{#{ENV['mail']}}"
了,但没有一个有效,它给出了语法错误