Rails中与ActiveJob接口的常见模式是使用perform()方法设置作业,该方法通过perform_now或perform_later异步调用UserMailer.welcome(@user).deliver_now# If you want to send the email through Active Job use #deliver_laterUserMa
我的Rails3.1项目中的ActionMailer有一个奇怪的行为,ActionMailer::Base.deliveries在测试中是空的,而我实际上可以通过在Rails控制台中运行代码来接收电子邮件deliver } it "should be delivered" do
ActionMailer:subject) { should == "Task R
中的告诉我:“默认情况下,Action Mailer不会在测试环境中发送电子邮件,它们只是添加到ActionMailer::Base.deliveries数组中。”config.action_mailer.delivery_method = :test# Configuration for using SendGrid on Heroku :enable_starttls_auto =&