Giter VIP home page Giter VIP logo

mailcatcher's People

Contributors

ahmedgagan avatar boffbowsh avatar captbaritone avatar clockwerx avatar cobbr2 avatar csiszarattila avatar davad avatar dirkkelly avatar duncan3dc avatar ferdy89 avatar hdabrows avatar igneus avatar jacobh avatar jjoos avatar joshmcarthur avatar kimptoc avatar kulesa avatar lime avatar marcmillien avatar mtsmfm avatar ohbarye avatar olleolleolle avatar orhantoy avatar sandersch avatar schmidt avatar scudelletti avatar sj26 avatar tagliala avatar tonymtz avatar toy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailcatcher's Issues

Cucumber integration?

I'd love to be able to view a message that was sent through my test suite via rSpec or Cucumber. I can't seem to get it to work by using the same settings from config/env/development.rb as test.rb. Things work fine in development mode.

I also have config.action_mailer.perform_deliveries = true in my test.rb but to no avail.

Thanks,
Jon

Exception: SQL logic error or missing database

I am having a problem with mailcatcher on CentOS 5.8 with ruby 1.9.2-p180. Mailcatcher starts and binds to ports without issue. The first email I send is captured correctly and if I visit the web interface I can see that email. However, any subsequent emails are lost and do not show up in the web interface.

If I run mailcatcher in the foreground, I get the following error message: https://gist.github.com/2961398, which seems to point to a problem with sqlite.

Please let me know what else i can do to help you debug this issue.

favicon gone?

No big deal, but just noticed there is no favicon on the :1080 interface :)

Support for CC, BCC

I'd love to see support for CC and BCC. I'm just now picking up a little Ruby, so I'm going to try forking the project to see if it's something I could put together myself, but I figured I'd post it as an issue in case someone gets to it before I do :).

Time stamp on web display

The time stamp of mail it traps seems to be being displayed in UTC (or GMT), is there someway to change this to localize it to our time zone?

Otherwise it's a great product!

Firefox can't establish connection to the server

It's bit weird but when I open MailCatcher with Firefox the polling is not working.
I get the following error in Firebug:

Firefox can't establish a connection to the server at ws://localhost:1080/messages.

What is weirder is that it works when I do the same thing in the Firebug console...

Just so you know, I'm using Firefox v11.0 on OS X. It was working before so I guess it's related to something that changed in ff...

Can't Run Mailcatcher on Windows

using Ruby v.1.9.3

D:\dev\uni\www\oh-itu\nodeapp>gem install mailcatcher
Fetching: eventmachine-1.0.0-x86-mingw32.gem (100%)
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.4.1.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Fetching: skinny-0.2.2.gem (100%)
Fetching: mailcatcher-0.5.9.gem (100%)
Successfully installed eventmachine-1.0.0-x86-mingw32
Successfully installed daemons-1.1.9
Successfully installed thin-1.4.1
Successfully installed skinny-0.2.2
Successfully installed mailcatcher-0.5.9
5 gems installed
Installing ri documentation for eventmachine-1.0.0-x86-mingw32...
Installing ri documentation for daemons-1.1.9...
Installing ri documentation for thin-1.4.1...
Installing ri documentation for skinny-0.2.2...
Installing ri documentation for mailcatcher-0.5.9...
Installing RDoc documentation for eventmachine-1.0.0-x86-mingw32...
Installing RDoc documentation for daemons-1.1.9...
Installing RDoc documentation for thin-1.4.1...
Installing RDoc documentation for skinny-0.2.2...
Installing RDoc documentation for mailcatcher-0.5.9...

D:\dev\uni\www\oh-itu\nodeapp>mailcatcher
D:/inst/rails/Ruby1.9.3/lib/ruby/1.9.1/open3.rb:202:in `spawn': No such file or
directory - which (Errno::ENOENT)
        from D:/inst/rails/Ruby1.9.3/lib/ruby/1.9.1/open3.rb:202:in `popen_run'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/1.9.1/open3.rb:90:in `popen3'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/
lib/mail_catcher.rb:12:in `which'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/
lib/mail_catcher.rb:30:in `growlnotify?'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/
lib/mail_catcher.rb:56:in `<module:MailCatcher>'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/
lib/mail_catcher.rb:10:in `<top (required)>'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_re
quire.rb:36:in `require'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_re
quire.rb:36:in `require'
        from D:/inst/rails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/
bin/mailcatcher:3:in `<top (required)>'
        from D:/inst/rails/Ruby1.9.3/bin/mailcatcher:19:in `load'
        from D:/inst/rails/Ruby1.9.3/bin/mailcatcher:19:in `<main>'

any suggestion? Thanks in advance

"Illegal option -s" when starting MailCatcher

When starting MailCatcher on Ubuntu, the following error is displayed:

Illegal option -s
Usage: /usr/bin/which [-a] args

I believe this is because you're trying to use a BSD specific argument, which throws an error on GNU which. It appears they had the same issue with Homebrew - Homebrew/legacy-homebrew#8801

I think the end solution was to implement this - https://github.com/adamv/homebrew/commit/dd280b935c3db50770f58de89029ce6ff6f28218 - so perhaps a similar method is required in MailCatcher?

Proxy via nginx

For those looking to expose using nginx, you can try this config

upstream mailcatch {
   server 127.0.0.1:8025;
}

server {
   limit_conn  gulag 10;
   listen      <my ip>:80;
   server_name <FQDN>;
   root /usr/lib/ruby/gems/1.8/gems/mailcatcher-0.5.10/public;

   location / {
     try_files $uri @dynamic;
   }

   location @dynamic {
     proxy_pass http://mailcatch;
   }
}

Mailcatcher started using mailcatcher --smtp-ip 127.0.0.1 --smtp-port 1025 --http-ip 0.0.0.0 --http-port 8025

Deletion fails

==> SMTP: Received message from '<[email protected]> size=432' (427 bytes)
SQLite3::SQLException - SQL logic error or missing database:
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:67:in `step'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:67:in `execute'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/mailcatcher-0.5.11/lib/mail_catcher/mail.rb:157:in `delete_message!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/mailcatcher-0.5.11/lib/mail_catcher/web.rb:138:in `block in <class:Web>'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1415:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1415:in `block in compile!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `[]'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `block (3 levels) in route!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:960:in `route_eval'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `block (2 levels) in route!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:981:in `block in process_route'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `catch'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `process_route'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:943:in `block in route!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `each'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `route!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1053:in `block in dispatch!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `block in invoke'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1050:in `dispatch!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `block in call!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `block in invoke'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `call!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:864:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/showexceptions.rb:21:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:172:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1947:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `block in call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1693:in `synchronize'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `call'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/connection.rb:81:in `block in pre_process'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/connection.rb:79:in `catch'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/connection.rb:79:in `pre_process'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/connection.rb:54:in `process'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/thin-1.5.1/lib/thin/connection.rb:39:in `receive_data'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/mailcatcher-0.5.11/lib/mail_catcher.rb:134:in `run!'
        /root/mailcatcher/lib/ruby/gems/2.0.0/gems/mailcatcher-0.5.11/bin/mailcatcher:4:in `<top (required)>'
        ./bin/mailcatcher:23:in `load'
        ./bin/mailcatcher:23:in `<main>'

It's running on the current "stable" ruby version built from source. This is the mail in case it matters:

Content-Type: text/plain; charset="utf-8"
From: ***
To: ***
Subject: New meeting in indico (242075)
Date: Fri, 26 Apr 2013 10:24:07 +0200


_Category_
TEST Category
_Title_
does it work?
_Speaker/Chair_

_Room_

_Description_

_Creator_
MÖNNICH, Adrian (42604)
_Date_
2013-04-26 08:00:00+02:00 -> 2013-04-26 18:00:00+02:00
_Access_
https://********/conferenceDisplay.py?confId=242075

mailcatcher Command Fails in Automator with Growl flag

I know this may not be directly related to the Mailcatcher code itself, but I'm having a hard time creating an Automator action that works correctly. Here are my inputs, both of which work perfectly from Terminal:

  1. mailcatcher --smtp-ip 10.37.129.2
  2. mailcatcher --smtp-ip 10.37.129.2 --growl

If I use Command number 1 in Automator, and then open up Safari to 127.0.0.1:1080, it works perfectly. I get the following output to the results window:

Starting MailCatcher
==> smtp://10.37.129.2:1025
==> http://127.0.0.1:1080
*** MailCatcher now runs as a daemon by default. Go to the web interface to quit.

If I add the --growl flag in command 2 and run the Automator workflow, Automator tells me The action "Run Shell Script" encountered an error, but it doesn't tell me where the error is, and there are no results returned from the script.

Can anyone else reproduce this issue in Automator? Automator Workflow Screenshot

`event_callback`: undefined method `close' for 9:Fixnum (NoMethodError)

Here's what I'm doing:

  1. Start mailcatcher on the command line via mailcatcher
  2. Visit http://localhost:1080
  3. Page loads, but server crashes with this error:
redtail git:master ❯ mailcatcher                                                                                                                             ⏎
Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
/Users/evan/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1441:in `event_callback': undefined method `close' for 9:Fixnum (NoMethodError)
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/mailcatcher-0.2.4/lib/mail_catcher.rb:21:in `run'
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/mailcatcher-0.2.4/bin/mailcatcher:44:in `<top (required)>'
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/bin/mailcatcher:23:in `load'
    from /Users/evan/.rbenv/versions/1.9.3-p194-perf/bin/mailcatcher:23:in `<main>'

What gives?

Change Default HTTP IP?

I'm curious if it would cause a problem to change the default http ip to '0.0.0.0' ? It should still work the same and it would them work out of the box for people like me who develop in headless vagrant virtual machines and need to forward the port.

I'd be happy to do the pull request if you like.

I love the gem by the way.

Dependency issue while trying to install mailcatcher 0.5.8

Dependency issue while trying to install mailcatcher 0.5.8

..
Unable to activate skinny-0.2.2, because eventmachine-0.12.6 conflicts with eventmachine (~> 1.0) (Gem::LoadError)
..

0.5.8 does not work with skinny-0.2.2, only skinny-0.2.1

Smtp receiver should de-dup dots at beginning of a line

I'm not 100% certain, but it seems that according to rfc 821

http://tools.ietf.org/html/rfc821#page-41

the smtp receiving server should de-dup dots at the beginning of lines. This currently does not seem to be the case.

As a result, urls that wraps line in a mime message could end up with double dots and thus won't render properly.

For instance something like:

                        <img alt=3D"Orange_dog" src=3D"https://s3.amazonaws=
..com/attachments/image.png"/>

in the message will yield an invalid url in the browser when viewed in mailcatcher.

Mailcatcher crashing

I noticed that mailcatcher was crashing reasonably frequently.

Ran it in the foreground with verbose output and got this:

Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
==> SMTP: Received message from '<[email protected]>' (1232 bytes)
==> SMTP: Received message from '<[email protected]>' (1101 bytes)
==> SMTP: Received message from '<[email protected]>' (1098 bytes)
==> SMTP: Received message from '<[email protected]>' (1103 bytes)
/home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/gems/eventmachine-1.0.0/lib/eventmachine.rb:1441:in `event_callback': undefined method `close' for 15:Fixnum (NoMethodError)
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/gems/mailcatcher-0.5.9/lib/mail_catcher.rb:134:in `run!'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/gems/mailcatcher-0.5.9/bin/mailcatcher:4:in `<top (required)>'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/bin/mailcatcher:19:in `load'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/bin/mailcatcher:19:in `<main>'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/thomasfedb/.rvm/gems/ruby-1.9.3-p0@synaptor-observations/bin/ruby_noexec_wrapper:14:in `<main>'

Shutdown

GIven MailCatcher can now be run as a daemon, it would be nice if MailCatcher could be shut down from within the web interface.

MailCatcher 0.5.9 requires Skinny 0.2.2

Since solving #54 Gem dependencies aren't resolved properly:

/opt/ruby/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1615:in 'raise_if_conflicts':
Unable to activate skinny-0.2.1, because eventmachine-1.0.0 conflicts with eventmachine (~> 0.12) (Gem::LoadError)

Please set the version dependency in mailcatcher.gemspec:

--- a/mailcatcher.gemspec
+++ b/mailcatcher.gemspec
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
   s.add_dependency "sinatra", "~> 1.2"
   s.add_dependency "sqlite3", "~> 1.3"
   s.add_dependency "thin"
-  s.add_dependency "skinny"
+  s.add_dependency "skinny", "~> 0.2.2"

Maybe "thin" version should also be defined.

Persistence

It would be nice if MailCatcher had the option of persisting messages between restarts.

Refreshing mailcatcher

When refreshing the web interface

root@staging:/home/ubuntu# mailcatcher --ip 10.0.2.15 -f
Starting MailCatcher
==> smtp://10.0.2.15:1025
==> http://10.0.2.15:1080
/usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1441:in `event_callback': undefined method `close' for 11:Fixnum (NoMethodError)
        from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
        from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
        from /usr/local/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/lib/mail_catcher.rb:134:in `run!'
        from /usr/local/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.9/bin/mailcatcher:4:in `<top (required)>'
        from /usr/local/bin/mailcatcher:19:in `load'
        from /usr/local/bin/mailcatcher:19:in `<main>'
root@staging:/home/ubuntu# 
root@staging:/home/ubuntu# gem list | grep mailcatcher
mailcatcher (0.5.9)
root@staging:/home/ubuntu# 

Run multiple instances

I had a quick look at the code, but I'm not really a Ruby man so I might be wrong, but it looks like it isn't possible to run multiple instances (unless I duplicate the directory). I would be nice if I could specify an instance id on the command line so I could run multiple instances side by side

mailcatcher --instance site1 --smtp-ip 127.0.0.1 --smtp-port 1025 --http-ip 0.0.0.0 --http-port 8025
mailcatcher --instance site2 --smtp-ip 127.0.0.1 --smtp-port 1025 --http-ip 0.0.0.0 --http-port 8025

I'll try to create a PR if this is something that might be added.

Installation instructions outdated

Using the latest rvm for these,
rvm default@mailcatcher --create gem install mailcatcher
rvm wrapper default@mailcatcher --no-prefix mailcatcher catchmail

I get the following error:

Please note that `rvm gem ...` was removed, try `gem install mailcatcher` or `rvm all do gem install mailcatcher` instead. ( see: 'rvm usage' )

Delivery

It would be nice if MailCatcher could on-send captured messages to their intended recipients, or a separately provided recipient.

Clear

It would be nice if caught email could be expunged in the web interface, saving clutter.

Errors viewing messages

I assume this is a gem conflict somewhere, sorry about the screenshot however the copy + paste into a gist was pretty hard to read too:

Stacktrace (kinda)

NoMethodError at /messages/1.html undefined method gsub!' for nil:NilClass`

Sintra Error

gem 'rails', '3.2.1'
gem "sinatra", "~> 1.3.3"

Net::SMTPFatalError (550 Message rejected)

I'm having an issue on my machine that my other developers aren't getting with the exact same code base. When sending via smtp in Rails and using mail catcher I'm getting 550s. The mail does show up in mailcatcher, however, it looks like a mime attachment instead of an html message.

$ mailcatcher -f -v                                                                                                                                                                                                                                           Starting MailCatcher                                                                                                                                                                                                                                          ==> smtp://127.0.0.1:1025                                                                                                                                                                                                                                     ==> http://127.0.0.1:1080                                                                                                                                                                                                                                     *** Error receiving message: {:sender=>"<[email protected]>", :recipients=>["<m                                                                                                                                                                              [email protected]>"], :source=>""}                                                                                                                                                                                                                                        Exception: undefined method `match' for nil:NilClass                                                                                                                                                                                                          Backtrace:                                                                                                                                                                                                                                                       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mail-2.4.4/lib/mail/utilities.rb:104:in `unbracket'                                                                                                                                  
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mail-2.4.4/lib/mail/part.rb:29:in `cid'                                                                                                                                              
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:51:in `block in add_message'                                                                                                             
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:48:in `each'                                                                                                                             
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:48:in `add_message'                                                                                                                      
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/smtp.rb:45:in `receive_message'                                                                                                                  
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/smtpserver.rb:532:in `process_data_line'                                                                                                         
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/smtpserver.rb:196:in `receive_line'                                                                                                              
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/linetext2.rb:64:in `receive_data'                                                                                                                
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'                                                                                                                                     /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'                                                                                                                                             /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher.rb:134:in `run!'                                                                                                                                            /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/bin/mailcatcher:4:in `<top (required)>'                                                                                                                                      /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/bin/mailcatcher:19:in `load'                                                                                                                                                                         /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/bin/mailcatcher:19:in `<main>'               

.

"Download" link doesn't work in Chromium 14.0.783.0 (87587)

If you click the "Download" link for a message in Chromium, you just get a # added to your URL. The debugger doesn't indicate a Javascript error.

I can take a look at this (since I'm the one using a silly nightly browser) if it works in other browsers, but I wasn't sure if maybe it was an unimplemented feature.

Dependency on thin makes running on JRuby impossible

The dependency on thin makes it impossible to run mailcatcher on JRuby.

Would it be a good approach to avoid being dependent on any specific server, perhaps picking from a few options at runtime? Or maybe just using a pure Ruby equivalent, such as Webrick?

Send Email through Mailcatcher from external host

Would be great to be able to send email from an external host. For example, I work on a mac with a Windows Server running in Parallels. I'd like to be able to send email via smtp://10.37.129.2:1025.

This would allow me to view my email spool on the mac side of things while the windows server sits in the background. I use MockSMTP to do this currently, but it's development has stalled, and I can't get support for issues related to the app.

Getting an error trying to run on Windows with Ruby 1.8.7

Getting the following error when trying to use the latest version (0.4.0) however version 0.3.2 starts up and runs just fine. This is on Windows 7 using Ruby 1.8.7.

C:\Program Files\Console2>mailcatcher
Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
*** MailCatcher now runs as a daemon by default. Go to the web interface to quit.
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/core_ext/process/daemon.rb:3:in `fork':
fork() function is unimplemented on this machine (NotImplementedError)
        from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/core_ext/process/daemon.rb:3:in `daemon'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/mailcatcher-0.4.0/lib/mail_catcher.rb:95:in `run!'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `call'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `run_deferred_callbacks'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `each'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `run_deferred_callbacks'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/mailcatcher-0.4.0/lib/mail_catcher.rb:75:in `run!'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/mailcatcher-0.4.0/bin/mailcatcher:4
        from C:/Ruby187/bin/mailcatcher:19:in `load'
        from C:/Ruby187/bin/mailcatcher:19

Is there something I need to do to get the latest version to run on my setup?

Date Parsing in Chrome

(possibly happens in other browsers, will follow up with more testing)

In chrome the date column was displaying 7th August for a mail that was delivered 7th of July.. screenshot coming when i do more testing and check other browsers. May fork it and patch issue myself.

Websocket handshake issue

Not sure if this is specific to mailcatcher or more of a chrome issue, but on the latest version of chrome, I am now receiving a websocket exception that prevents the background polling of new emails (in the UI) from working. This is the exception from the javascript console:

Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch

I'm using Chrome 20.0.1132.57

`popen': wrong number of arguments (3 for 2)

In version 0.5.7 I've got following error

→ mailcatcher
/home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/gems/mailcatcher-0.5.7/lib/mail_catcher.rb:19:in `popen': wrong number of arguments (3 for 2) (ArgumentError)
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/gems/mailcatcher-0.5.7/lib/mail_catcher.rb:19:in `which'
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/gems/mailcatcher-0.5.7/lib/mail_catcher.rb:35:in `growlnotify?'
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/gems/mailcatcher-0.5.7/lib/mail_catcher.rb:61
    from /home/ck3g/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
    from /home/ck3g/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/gems/mailcatcher-0.5.7/bin/mailcatcher:3
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/bin/mailcatcher:19:in `load'
    from /home/ck3g/.rvm/gems/ree-1.8.7-2012.02@24h/bin/mailcatcher:19

20b5635

There is no errors in version 0.5.6

remove dependency on haml for rails 3.2.3

according to rails/rails#393
and https://github.com/haml/haml/blob/master/lib/haml/helpers/rails_323_textarea_fix.rb

I use slim with rails 3.2.3 in one of my company's projects, and in development env, I use mailcatcher.
So it will cause issue even I didn't use HAML on my project.

One solution is update HAML to 3.1.6.rc.1
but I think that will cause conflict if someone need an older version of HAML.

So it seems that remove the dependency on HAML is a good solution. as there's only one view file views/index.haml.

Sendmail -f option

Hi,

I'm using mailcatcher for Drupal 7 development, and it works great, but I had to do a bit of tweaking before using it. Drupal 7 uses, by default, the -f option when sending an email. However, the -f option is not accepted by catchmail, which therefore generates an error.

If it's possible, it would be great to add a fake -f option to catchmail. Here is what I added, in the bin/catchmail file:
parser.on('-f FROM', 'Set the from address') do |from|

end

Rails 3.0.3 issues

This will not work with Rails 3.0.3/3.0.9 as these versions depend on mail ~>2.2.19 and mailcatcher depends on mail 2.3.0 - is there any reason for mailcatcher needing the next major version up? Seems a shame I can't use this great tool in a Rails 3 app. Upgrading to 3.1 is not an option at present.

Rails 4 support

With mailcatcher and rails 4.0.0.beta1, launch app failed becaus of depedence with activesupport
s.add_dependency "activesupport", "~> 3.0"

error when starting mailcatcher (gem_original_require': no such file to load -- tilt (LoadError))

$ mailcatcher --version
Invalid gemspec in [/var/lib/gems/1.8/specifications/skinny-0.2.0.gemspec]: invalid date format in specification: "2010-11-01 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
Illegal option -s
Usage: /usr/bin/which [-a] args
mailcatcher 0.5.5
$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
$ gem --version
Invalid gemspec in [/var/lib/gems/1.8/specifications/skinny-0.2.0.gemspec]: invalid date format in specification: "2010-11-01 00:00:00.000000000Z"
Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
1.7.2

Sync STDOUT

When running with foreman, the output doesn't appear until I stop foreman because it's buffered. Is there currently a way to set STDOUT.sync = true? Could an option be added to do so? Thanks!

Instructions for running under supervisord

I'm not sure if this is a mailcatcher issue, but adding instructions for running mailcatcher under supervisord would be helpful. I couldn't get it working due to gemfile issues, the log says:

Could not locate Gemfile

I have the following in my supervisord.conf

command=/var/lib/jenkins/.rvm/bin/app_bundle exec catchmail

after running:

rvm gemset create mailcatcher
rvm gemset install mailcatcher mailcatcher

Linked format tabs

Having the actual HREFs filled for format tabs would make opening HTML in a new window or tab easy.

bundler downgrades mailcatcher after eventmachine upgrade

current dependence is eventmachine (~> 0.12) the new eventmachine version is 1.0. So it downgrades to mailcatcher (0.2.4) since it didn't specify eventmachine version. Current workaround is to lock the version number for mailcatcher in your Gemfile. But it will then use the older eventmachine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.