A Mock SMTP server for rails developers
For my current Ruby on Rails project I am using email based authentication plug-in clearance.
After the registration users get an email with an activation link, but at development environment I don’t have fully functional mail server. I don’t need it either. I just want to catch the generated emails and I don’t want to change my code to do that.
After doing some Internet search I found exactly what I needed. Mailtrap a mock STMP sever. It is distributed as a gem. You can install it with following command.
sudo gem install -y mailtrap
Let’s stat the mailtrap
mailtrap start
Since we didn’t specify any host or port information it will start default parameters. (default: localhost) and port (default: 2525) for the server and also where the messages get written (default: /var/tmp/mailtrap.log)
You can get more information you can visit the documentation page.
Related posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
