mail_view 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mail_view/email.html.erb +98 -0
- data/lib/mail_view/index.html.erb +5 -0
- metadata +4 -2
@@ -0,0 +1,98 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html><head>
|
3
|
+
<meta name="viewport" content="width=device-width" />
|
4
|
+
<style type="text/css">
|
5
|
+
header {
|
6
|
+
width: 100%;
|
7
|
+
padding: 10px 0 0 0;
|
8
|
+
margin: 0;
|
9
|
+
background: white;
|
10
|
+
font: 12px "Lucida Grande", sans-serif;
|
11
|
+
border-bottom: 1px solid #dedede;
|
12
|
+
overflow: hidden;
|
13
|
+
}
|
14
|
+
|
15
|
+
dl {
|
16
|
+
margin: 0 0 10px 0;
|
17
|
+
padding: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
dt {
|
21
|
+
width: 80px;
|
22
|
+
padding: 1px;
|
23
|
+
float: left;
|
24
|
+
clear: left;
|
25
|
+
text-align: right;
|
26
|
+
color: #7f7f7f;
|
27
|
+
}
|
28
|
+
|
29
|
+
dd {
|
30
|
+
margin-left: 90px; /* 80px + 10px */
|
31
|
+
padding: 1px;
|
32
|
+
}
|
33
|
+
|
34
|
+
iframe {
|
35
|
+
border: 0;
|
36
|
+
width: 100%;
|
37
|
+
height: 800px;
|
38
|
+
}
|
39
|
+
</style>
|
40
|
+
</head>
|
41
|
+
|
42
|
+
<body>
|
43
|
+
<header>
|
44
|
+
<dl>
|
45
|
+
<% if mail.respond_to?(:smtp_envelope_from) && Array(mail.from) != Array(mail.smtp_envelope_from) %>
|
46
|
+
<dt>SMTP-From:</dt>
|
47
|
+
<dd><%= mail.smtp_envelope_from %></dd>
|
48
|
+
<% end %>
|
49
|
+
|
50
|
+
<% if mail.respond_to?(:smtp_envelope_to) && mail.to != mail.smtp_envelope_to %>
|
51
|
+
<dt>SMTP-To:</dt>
|
52
|
+
<dd><%= mail.smtp_envelope_to %></dd>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<dt>From:</dt>
|
56
|
+
<dd><%= Rack::Utils.escape_html(mail.header['from'].to_s) %></dd>
|
57
|
+
|
58
|
+
<% if mail.reply_to %>
|
59
|
+
<dt>Reply-To:</dt>
|
60
|
+
<dd><%= Rack::Utils.escape_html(mail.header['reply-to'].to_s) %></dd>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
<dt>To:</dt>
|
64
|
+
<dd><%= Rack::Utils.escape_html(mail.header['to'].to_s) %></dd>
|
65
|
+
|
66
|
+
<% if mail.cc %>
|
67
|
+
<dt>CC:</dt>
|
68
|
+
<dd><%= Rack::Utils.escape_html(mail.header['cc'].to_s) %></dd>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<dt>Date:</dt>
|
72
|
+
<dd><%= Time.now.strftime("%b %e, %Y %I:%M:%S %p %Z") %></dd>
|
73
|
+
|
74
|
+
<dt>Subject:</dt>
|
75
|
+
<dd><strong><%= mail.subject %></strong></dd>
|
76
|
+
|
77
|
+
<% unless mail.attachments.nil? || mail.attachments.empty? %>
|
78
|
+
<dt>Attachments:</dt>
|
79
|
+
<dd>
|
80
|
+
<%= Rack::Utils.escape_html mail.attachments.map { |a| a.respond_to?(:original_filename) ? a.original_filename : a.filename }.inspect %>
|
81
|
+
</dd>
|
82
|
+
<% end %>
|
83
|
+
|
84
|
+
<% if mail.multipart? %>
|
85
|
+
<dd>
|
86
|
+
<select onchange="document.getElementsByName('messageBody')[0].src=this.options[this.selectedIndex].value;">
|
87
|
+
<option value="?part=text%2Fhtml">View as HTML email</option>
|
88
|
+
<option value="?part=text%2Fplain">View as plain-text email</option>
|
89
|
+
</select>
|
90
|
+
</dd>
|
91
|
+
<% end %>
|
92
|
+
</dl>
|
93
|
+
</header>
|
94
|
+
|
95
|
+
<iframe seamless name="messageBody" src="<%= part_url %>"></iframe>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tilt
|
@@ -98,6 +98,8 @@ extensions: []
|
|
98
98
|
extra_rdoc_files: []
|
99
99
|
files:
|
100
100
|
- init.rb
|
101
|
+
- lib/mail_view/email.html.erb
|
102
|
+
- lib/mail_view/index.html.erb
|
101
103
|
- lib/mail_view/mapper.rb
|
102
104
|
- lib/mail_view.rb
|
103
105
|
homepage: https://github.com/37signals/mail_view
|