If you have a UserMailer setup using the password_reminder method, you can call create_password_reminder instead of deliver_password_reminder and create a message without actually sending it. Then you can send the output to the log file:
Where would you be:
UserMailer.deliver_password_reminder
You can replace with:
logger.info UserMailer.create_password_reminder.encoded
Or, if you want to send it to a file, you can also do this.
So the work environment is really not the place for this kind of thing. I never had to do this because my email programs have full testing coverage. I would consider this option instead, but I gave the answer you asked because I do not know your complete situation. Happy coding :)
source share