Forum: Ruby on Rails Email preview in production in rails 4

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D010d17a7291cfc9cf8913c6758ee9c6?d=identicon&s=25 Hristo Peev (Guest)
on 2014-12-11 17:18
(Received via mailing list)
Hello,

I am using rails 4.1.1 and ActionMailer::Preview. In development
environment everything is working excellent.

But in production environment the preview routes are not accessible. I
store the previews in test/mailers/previews/
Is is possible to enable them for production?

Thanks!
9bb3e64c214c900b4f0e86058725cf36?d=identicon&s=25 jbar (Guest)
on 2015-01-07 23:19
(Received via mailing list)
Did you ever find a solution? I'm looking to do the same thing.
D010d17a7291cfc9cf8913c6758ee9c6?d=identicon&s=25 Hristo Peev (Guest)
on 2015-01-08 09:15
(Received via mailing list)
Hi,

I have a clue, but I haven't tested it yet.

Try to add the routes in your routes.rb file manually.

If you have a chance to test this, please, write a line about the
results.

Thanks!
97978b380ede1a624564888d5d943be1?d=identicon&s=25 Harshvardhan Parihar (Guest)
on 2015-02-18 17:39
(Received via mailing list)
Did u get the solution for this issue.
D010d17a7291cfc9cf8913c6758ee9c6?d=identicon&s=25 Hristo Peev (Guest)
on 2015-02-19 07:00
(Received via mailing list)
Hi,

I have a clue, but I haven't tested it yet.

Try to add the routes in your routes.rb file manually.

If you have a chance to test this, please, write a line about the
results.

Thanks!

On Wednesday, February 18, 2015 at 6:27:11 PM UTC+2, Harshvardhan
Parihar
0adf360e3807fd610c681e18232c44a2?d=identicon&s=25 Mike S. (mike_s97)
on 2015-03-08 12:37
(Received via mailing list)
You should not really do this as the whole point of the production
environment is to be live and sending mails

The content should not be different to your test or development
environment so I am not sure what issue you think you are having

However if you want to do this, then I would suggest something like the
mailcatcher gem and temporarily reset your production SMTP settings to
use that, however as I said above there should be no need to do this
assuming you have tested your app previously

Obviously if you reset your SMTP settings to use mailcatcher then no one
will receive any live email from your app
This topic is locked and can not be replied to.