Permalink
Newer
Older
100644 89 lines (76 sloc) 1.71 KB
1
<head>
2
<meta http-equiv="Content-Type" content="text/html; charset=<%= body_part.charset %>" />
3
</head>
Apr 21, 2010
4
<style type="text/css">
5
#message_headers {
6
position: absolute;
7
top: 0px;
8
left: 0;
9
width: 100%;
10
height: 85px;
11
padding: 10px 0 0 0;
12
margin: 0;
13
background: #fff;
14
font-size: 12px;
15
font-family: "Lucida Grande";
16
border-bottom: 1px solid #dedede;
17
overflow: hidden;
18
}
19
20
#message_headers dl {
21
margin: 0;
22
padding: 0;
23
}
24
25
#message_headers dt {
26
width: 60px;
27
padding: 1px;
28
float: left;
29
text-align: right;
30
font-weight: bold;
31
color: #7f7f7f;
32
}
33
34
#message_headers dd {
35
margin-left: 70px;
36
padding: 1px;
37
}
38
39
#message_headers p.alternate {
40
position: absolute;
41
top: 0;
42
right: 15px;
43
}
44
45
#message_headers p.alternate a {
46
color: #09c;
47
}
48
49
pre#message_body {
50
padding: 10px;
Apr 21, 2010
52
}
53
54
body {
55
margin-top: 96px;
56
}
57
</style>
58
<div id="message_headers">
59
<dl>
60
<dt>From:</dt>
61
<dd><%= mail.from %></dd>
62
63
<dt>Subject:</dt>
64
<dd><strong><%= mail.subject %></strong></dd>
65
66
<dt>Date:</dt>
67
<dd><%= Time.now.strftime("%b %e, %Y %I:%M:%S %p %Z") %></dd>
68
69
<dt>To:</dt>
70
<dd><%= mail.to %></dd>
71
</dl>
72
73
<% if mail.multipart? %>
74
<p class="alternate">
75
<% if body_part.content_type && body_part.content_type.match(/text\/html/) %>
76
<a href="<%= name %>.txt">View plain text version</a>
77
<% else %>
78
<a href="<%= name %>.html">View HTML version</a>
79
<% end %>
80
</p>
81
<% end %>
82
</div>
83
84
<% if body_part.content_type && body_part.content_type.match(/text\/html/) %>
85
<%= body_part.body %>
86
<% else %>
87
<pre id="message_body"><%= body_part.body %></pre>
88
<% end %>