mailcatcher 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/bin/mailcatcher +22 -5
- data/lib/mail_catcher.rb +4 -0
- metadata +22 -9
data/README.md
CHANGED
@@ -11,6 +11,7 @@ MailCatcher runs a super simple SMTP server which catches any message sent to it
|
|
11
11
|
* Rewrites HTML enabling display of embedded, inline images/etc. (currently very basic)
|
12
12
|
* Lists attachments and allows separate downloading of parts.
|
13
13
|
* Written super-simply in EventMachine, easy to dig in and change.
|
14
|
+
* Command line options to override the default SMTP/HTTP IP and port settings.
|
14
15
|
|
15
16
|
## Caveats
|
16
17
|
|
@@ -21,7 +22,6 @@ MailCatcher runs a super simple SMTP server which catches any message sent to it
|
|
21
22
|
|
22
23
|
## TODO
|
23
24
|
|
24
|
-
* Command line options.
|
25
25
|
* Websockets for immediate mail viewing.
|
26
26
|
* Download link to view original message in mail client.
|
27
27
|
* Growl support.
|
data/bin/mailcatcher
CHANGED
@@ -14,6 +14,26 @@ options = {}
|
|
14
14
|
OptionParser.new do |opts|
|
15
15
|
opts.banner = 'Usage: mailcatcher [options]'
|
16
16
|
|
17
|
+
options[:smtp_ip] = '127.0.0.1'
|
18
|
+
opts.on('--smtp-ip IP', 'Set the ip address of the smtp server') do |ip|
|
19
|
+
options[:smtp_ip] = ip
|
20
|
+
end
|
21
|
+
|
22
|
+
options[:smtp_port] = 1025
|
23
|
+
opts.on('--smtp-port PORT', Integer, 'Set the port of the smtp server') do |port|
|
24
|
+
options[:smtp_port] = port
|
25
|
+
end
|
26
|
+
|
27
|
+
options[:http_ip] = '127.0.0.1'
|
28
|
+
opts.on('--http-ip IP', 'Set the ip address of the http server') do |ip|
|
29
|
+
options[:http_ip] = ip
|
30
|
+
end
|
31
|
+
|
32
|
+
options[:http_port] = 1080
|
33
|
+
opts.on('--http-port PORT', Integer, 'Set the port address of the http server') do |port|
|
34
|
+
options[:http_port] = port
|
35
|
+
end
|
36
|
+
|
17
37
|
options[:verbose] = false
|
18
38
|
opts.on('-v', '--verbose', 'Be more verbose') do
|
19
39
|
options[:verbose] = true
|
@@ -21,11 +41,8 @@ OptionParser.new do |opts|
|
|
21
41
|
|
22
42
|
opts.on('-h', '--help', 'Display this help information') do
|
23
43
|
puts opts
|
24
|
-
exit
|
44
|
+
exit!
|
25
45
|
end
|
26
46
|
end.parse!
|
27
47
|
|
28
|
-
|
29
|
-
puts '==> smtp://127.0.0.1:1025'
|
30
|
-
puts '==> http://127.0.0.1:1080'
|
31
|
-
MailCatcher.run
|
48
|
+
MailCatcher.run(options)
|
data/lib/mail_catcher.rb
CHANGED
@@ -204,6 +204,10 @@ module MailCatcher
|
|
204
204
|
options[:http_ip] ||= '127.0.0.1'
|
205
205
|
options[:http_port] ||= 1080
|
206
206
|
|
207
|
+
puts "Starting MailCatcher"
|
208
|
+
puts "==> smtp://#{options[:smtp_ip]}:#{options[:smtp_port]}"
|
209
|
+
puts "==> http://#{options[:http_ip]}:#{options[:http_port]}"
|
210
|
+
|
207
211
|
Thin::Logging.silent = true
|
208
212
|
EM::run do
|
209
213
|
EM::start_server options[:smtp_ip], options[:smtp_port], SmtpServer
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Samuel Cochran
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
type: :runtime
|
45
45
|
version_requirements: *id002
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: haml
|
48
48
|
prerelease: false
|
49
49
|
requirement: &id003 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
type: :runtime
|
58
58
|
version_requirements: *id003
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
60
|
+
name: json
|
61
61
|
prerelease: false
|
62
62
|
requirement: &id004 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
type: :runtime
|
71
71
|
version_requirements: *id004
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
|
-
name:
|
73
|
+
name: mail
|
74
74
|
prerelease: false
|
75
75
|
requirement: &id005 !ruby/object:Gem::Requirement
|
76
76
|
none: false
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
type: :runtime
|
84
84
|
version_requirements: *id005
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
-
name:
|
86
|
+
name: thin
|
87
87
|
prerelease: false
|
88
88
|
requirement: &id006 !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
type: :runtime
|
97
97
|
version_requirements: *id006
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: sqlite3-ruby
|
100
100
|
prerelease: false
|
101
101
|
requirement: &id007 !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
type: :runtime
|
110
110
|
version_requirements: *id007
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: sinatra
|
113
113
|
prerelease: false
|
114
114
|
requirement: &id008 !ruby/object:Gem::Requirement
|
115
115
|
none: false
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
type: :runtime
|
123
123
|
version_requirements: *id008
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
|
-
name:
|
125
|
+
name: sunshowers
|
126
126
|
prerelease: false
|
127
127
|
requirement: &id009 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
@@ -134,6 +134,19 @@ dependencies:
|
|
134
134
|
version: "0"
|
135
135
|
type: :runtime
|
136
136
|
version_requirements: *id009
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: i18n
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
148
|
+
type: :runtime
|
149
|
+
version_requirements: *id010
|
137
150
|
description: " MailCatcher runs a super simple SMTP server which catches any\n message sent to it to display in a web interface. Run\n mailcatcher, set your favourite app to deliver to\n smtp://127.0.0.1:1025 instead of your default SMTP server,\n then check out http://127.0.0.1:1080 to see the mail.\n"
|
138
151
|
email: sj26@sj26.com
|
139
152
|
executables:
|