mailcatcher 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/catchmail +44 -0
- data/public/stylesheets/application.css +165 -41
- metadata +17 -4
data/bin/catchmail
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'mail'
|
5
|
+
rescue LoadError
|
6
|
+
require 'rubygems'
|
7
|
+
require 'mail'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'optparse'
|
11
|
+
|
12
|
+
options = {:smtp_ip => '127.0.0.1', :smtp_port => 1025}
|
13
|
+
|
14
|
+
OptionParser.new do |parser|
|
15
|
+
parser.banner = <<-BANNER.gsub /^ +/, ""
|
16
|
+
Usage: catchmail [options]
|
17
|
+
sendmail-like interface to forward mail to MailCatcher.
|
18
|
+
BANNER
|
19
|
+
|
20
|
+
parser.on('--ip IP') do |ip|
|
21
|
+
options[:smtp_ip] = ip
|
22
|
+
end
|
23
|
+
|
24
|
+
parser.on('--smtp-ip IP', 'Set the ip address of the smtp server') do |ip|
|
25
|
+
options[:smtp_ip] = ip
|
26
|
+
end
|
27
|
+
|
28
|
+
parser.on('--smtp-port PORT', Integer, 'Set the port of the smtp server') do |port|
|
29
|
+
options[:smtp_port] = port
|
30
|
+
end
|
31
|
+
|
32
|
+
parser.on('-h', '--help', 'Display this help information') do
|
33
|
+
puts parser
|
34
|
+
exit!
|
35
|
+
end
|
36
|
+
end.parse!
|
37
|
+
|
38
|
+
Mail.defaults do
|
39
|
+
delivery_method :smtp,
|
40
|
+
:address => options[:smtp_ip],
|
41
|
+
:port => options[:smtp_port]
|
42
|
+
end
|
43
|
+
|
44
|
+
Mail.deliver ARGF.read
|
@@ -1,46 +1,170 @@
|
|
1
|
-
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
1
|
+
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
2
|
+
margin: 0px;
|
3
|
+
padding: 0px;
|
4
|
+
border: 0px;
|
5
|
+
outline: 0px;
|
6
|
+
font-weight: inherit;
|
7
|
+
font-style: inherit;
|
8
|
+
font-size: 100%;
|
9
|
+
font-family: inherit;
|
10
|
+
vertical-align: baseline; }
|
2
11
|
|
3
|
-
body {
|
4
|
-
|
5
|
-
|
6
|
-
|
12
|
+
body {
|
13
|
+
line-height: 1;
|
14
|
+
background: #eee;
|
15
|
+
color: #000;
|
16
|
+
font-size: 12px;
|
17
|
+
font-family: Helvetica, Arial, sans-serif; }
|
18
|
+
|
19
|
+
ol, ul {
|
20
|
+
list-style: none; }
|
21
|
+
|
22
|
+
table {
|
23
|
+
border-collapse: separate;
|
24
|
+
border-spacing: 0px; }
|
25
|
+
|
26
|
+
caption, th, td {
|
27
|
+
text-align: left;
|
28
|
+
font-weight: normal; }
|
29
|
+
|
30
|
+
html, body {
|
31
|
+
width: 100%;
|
32
|
+
height: 100%; }
|
7
33
|
|
8
|
-
html, body { width: 100%; height: 100%; }
|
9
34
|
body {
|
10
|
-
display: -webkit-box;
|
11
|
-
|
12
|
-
|
35
|
+
display: -webkit-box;
|
36
|
+
display: -moz-box;
|
37
|
+
display: box;
|
38
|
+
-webkit-box-orient: vertical;
|
39
|
+
-moz-box-orient: vertical;
|
40
|
+
box-orient: vertical; }
|
41
|
+
|
13
42
|
#message {
|
14
|
-
display: -webkit-box;
|
15
|
-
|
16
|
-
|
17
|
-
|
43
|
+
display: -webkit-box;
|
44
|
+
display: -moz-box;
|
45
|
+
display: box;
|
46
|
+
-webkit-box-orient: vertical;
|
47
|
+
-moz-box-orient: vertical;
|
48
|
+
box-orient: vertical;
|
49
|
+
-webkit-box-flex: 1;
|
50
|
+
-moz-box-flex: 1;
|
51
|
+
box-flex: 1; }
|
52
|
+
|
18
53
|
#message iframe {
|
19
|
-
display: -webkit-box;
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
#mail
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
#
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
54
|
+
display: -webkit-box;
|
55
|
+
display: -moz-box;
|
56
|
+
display: box;
|
57
|
+
-webkit-box-flex: 1;
|
58
|
+
-moz-box-flex: 1;
|
59
|
+
box-flex: 1; }
|
60
|
+
|
61
|
+
#mail {
|
62
|
+
height: 10em;
|
63
|
+
overflow: auto;
|
64
|
+
background: #fff;
|
65
|
+
border-bottom: 1px solid #ccc; }
|
66
|
+
|
67
|
+
#mail table {
|
68
|
+
width: 100%; }
|
69
|
+
|
70
|
+
#mail table thead tr {
|
71
|
+
background: #eee;
|
72
|
+
color: #333; }
|
73
|
+
|
74
|
+
#mail table thead tr th {
|
75
|
+
padding: .25em;
|
76
|
+
font-weight: bold;
|
77
|
+
color: #666;
|
78
|
+
text-shadow: 0 1px 0 #fff; }
|
79
|
+
|
80
|
+
#mail table tbody tr:nth-child(even) {
|
81
|
+
background: #f0f0f0;
|
82
|
+
color: #333; }
|
83
|
+
|
84
|
+
#mail table tbody tr.selected {
|
85
|
+
background: Highlight;
|
86
|
+
color: HighlightText; }
|
87
|
+
|
88
|
+
#mail table tbody tr td {
|
89
|
+
padding: .25em; }
|
90
|
+
|
91
|
+
#message .metadata {
|
92
|
+
padding: 1em; }
|
93
|
+
|
94
|
+
#message .metadata div {
|
95
|
+
padding: .25em; }
|
96
|
+
|
97
|
+
#message .metadata div label {
|
98
|
+
display: inline-block;
|
99
|
+
width: 8em;
|
100
|
+
margin-right: .5em;
|
101
|
+
text-align: right;
|
102
|
+
font-weight: bold;
|
103
|
+
color: #666;
|
104
|
+
text-shadow: 0 1px 0 #fff; }
|
105
|
+
|
106
|
+
#message .metadata .subject span {
|
107
|
+
font-weight: bold; }
|
108
|
+
|
109
|
+
#message .metadata .attachments {
|
110
|
+
display: none; }
|
111
|
+
|
112
|
+
#message .metadata .attachments ul {
|
113
|
+
display: inline; }
|
114
|
+
|
115
|
+
#message .metadata .attachments ul li {
|
116
|
+
display: inline-block;
|
117
|
+
margin-right: .5em; }
|
118
|
+
|
119
|
+
#message .actions ul {
|
120
|
+
border-bottom: 1px solid #999;
|
121
|
+
padding: 0 .5em; }
|
122
|
+
|
123
|
+
#message .actions ul li.tab {
|
124
|
+
display: inline-block;
|
125
|
+
padding: .5em;
|
126
|
+
border: 1px solid #999;
|
127
|
+
background: #ddd;
|
128
|
+
color: #333;
|
129
|
+
border-width: 1px 1px 0 1px;
|
130
|
+
cursor: pointer;
|
131
|
+
text-shadow: 0 1px 0 #eee; }
|
132
|
+
|
133
|
+
#message .actions ul li.tab:not(.selected):hover {
|
134
|
+
background-color: #ddd; }
|
135
|
+
|
136
|
+
#message .actions ul li.tab.selected {
|
137
|
+
background: #fff;
|
138
|
+
color: #000;
|
139
|
+
height: 13px;
|
140
|
+
margin-bottom: -1px; }
|
141
|
+
|
142
|
+
#message .actions ul li.button {
|
143
|
+
display: inline-block;
|
144
|
+
float: right;
|
145
|
+
margin: 0 .25em; }
|
146
|
+
|
147
|
+
#message .actions ul li.button a {
|
148
|
+
display: inline-block;
|
149
|
+
padding: .25em .5em;
|
150
|
+
border: 1px solid #999;
|
151
|
+
border-radius: .35em;
|
152
|
+
background: #ddd;
|
153
|
+
color: #333;
|
154
|
+
text-decoration: none;
|
155
|
+
text-shadow: 1px 1px 0 #eee;
|
156
|
+
box-shadow: 1px 1px 0 #ccc; }
|
157
|
+
|
158
|
+
#message .actions ul li.button a:hover {
|
159
|
+
background: #fff;
|
160
|
+
text-shadow: none; }
|
161
|
+
|
162
|
+
#message .actions ul li.button a:active {
|
163
|
+
margin: 1px -1px -1px 1px;
|
164
|
+
box-shadow: none; }
|
165
|
+
|
166
|
+
#message .body {
|
167
|
+
width: 100%;
|
168
|
+
min-height: 20em;
|
169
|
+
height: 100%;
|
170
|
+
background: #fff; }
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mailcatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Samuel Cochran
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-29 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -111,10 +111,22 @@ dependencies:
|
|
111
111
|
version: "1.0"
|
112
112
|
type: :runtime
|
113
113
|
version_requirements: *id009
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: sass
|
116
|
+
prerelease: false
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ~>
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: "3.1"
|
123
|
+
type: :development
|
124
|
+
version_requirements: *id010
|
114
125
|
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"
|
115
126
|
email: sj26@sj26.com
|
116
127
|
executables:
|
117
128
|
- mailcatcher
|
129
|
+
- catchmail
|
118
130
|
extensions: []
|
119
131
|
|
120
132
|
extra_rdoc_files:
|
@@ -123,6 +135,7 @@ extra_rdoc_files:
|
|
123
135
|
files:
|
124
136
|
- README.md
|
125
137
|
- LICENSE
|
138
|
+
- bin/catchmail
|
126
139
|
- bin/mailcatcher
|
127
140
|
- lib/mail_catcher/events.rb
|
128
141
|
- lib/mail_catcher/mail.rb
|
@@ -147,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
160
|
requirements:
|
148
161
|
- - ">="
|
149
162
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
163
|
+
version: 1.8.7
|
151
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
165
|
none: false
|
153
166
|
requirements:
|
@@ -157,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
170
|
requirements: []
|
158
171
|
|
159
172
|
rubyforge_project:
|
160
|
-
rubygems_version: 1.
|
173
|
+
rubygems_version: 1.8.4
|
161
174
|
signing_key:
|
162
175
|
specification_version: 3
|
163
176
|
summary: Runs an SMTP server, catches and displays email in a web interface.
|