Send Email to Test Account in Dev/Test modes

How do I set a single email address to be used for all outgoing emails
in test/development modes using ActiveRecord?

Thanks,
-awt

Adam T. wrote:

How do I set a single email address to be used for all outgoing emails
in test/development modes using ActiveRecord?

Thanks,
-awt

Found the solution:

class ActionMailer::Base

def perform_delivery_fixed_email(mail)
dest = mail.destinations
mail.to = ‘[email protected]
mail.cc = ‘’
mail.bcc = ‘’
mail.subject = '[DEV] ’ + mail.subject
#mail.body = “[ORIGINAL RECIPIENTS] \n#{dest}
\n\n” + mail.body
perform_delivery_smtp(mail)
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs