简体   繁体   中英

Delayed_job in development

Right now my Usermailer is written so I have UserMailer.delay.deliver_blah. Everything works perfect, but like before I'd like the contents of the email printed out in the console for debugging. HOw do I do this?

Set the ActionMailer logger and set the correct log level, during mailer initialization.

ActionMailer::Base.logger = Logger.new(STDOUT)
ActionMailer::Base.logger.level = :info

OR

ActionMailer::Base.logger = Rails.logger
ActionMailer::Base.logger.level = :info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM