How to use MockSMTP in a Ruby On Rails application ?

Just set ActionMailer delivery method to :smtp and use the port you have set in MockSMTP.

1config.action_mailer.delivery_method = :smtp
2ActionMailer::Base.smtp_settings = {
3 :address => "localhost",
4 :port => 1025,
5 :domain => ""


Preferences preferences

Can I use port 25, default SMTP port?

Not directly. Ports under 1000 require administrator access. As the application is now also available on App-Store, root access is denied by Apple (and it's a good thing). By you can setup a port forwarding on your mac easily like this.

In a terminal, run this command:

    sudo ipfw add 1025 forward,1025 ip from any to any 25 in

Now you can setup MockSMTP on port 1025 and setup your application to use SMTP on port 25.

To stop port forwarding, run :

    sudo ipfw delete 1025

How do I report a bug or request for a new features ?

Use the feedback form to report ideas/problems or to share settings in other frameworks.