Sha256: 448a73d9c8dc0ebeb405f3ef2f8de94a8f2d15970f98f6d8f50d24e26ee09320

Contents?: true

Size: 1.79 KB

Versions: 1

Compression:

Stored size: 1.79 KB

Contents

<meta http-equiv="Content-Type" content="text/html; charset=<%= encoding %>">

<style type="text/css">
  #message_headers {
    width: 100%;
    padding: 10px 0 0 0;
    margin: 0;
    background: #fff;
    font-size: 12px;
    font-family: "Lucida Grande";
    border-bottom: 1px solid #dedede;
    overflow: auto;
  }

  #message_headers dl {
    float: left;
    margin: 0 0 10px 0;
    padding: 0;
  }

  #message_headers dt {
    width: 62px;
    padding: 1px;
    float: left;
    text-align: right;
    font-weight: bold;
    color: #7f7f7f;
  }

  #message_headers dd {
    margin-left: 72px;
    padding: 1px;
  }

  #message_headers p.alternate {
    float: right;
    margin: 0;
  }

  #message_headers p.alternate a {
    color: #09c;
  }

  pre#message_body {
    padding: 10px;
    word-wrap: break-word;
  }
</style>

<div id="message_headers">
  <dl>
    <dt>From:</dt>
    <dd><%= from %></dd>

    <% unless reply_to.empty? %>
      <dt>Reply-To:</dt>
      <dd><%= reply_to %></dd>
    <% end %>

    <dt>Subject:</dt>
    <dd><strong><%= mail.subject %></strong></dd>

    <dt>Date:</dt>
    <dd><%= Time.now.strftime("%b %e, %Y %I:%M:%S %p %Z") %></dd>

    <% unless to.empty? %>
      <dt>To:</dt>
      <dd><%= to %></dd>
    <% end %>

    <% if mail.cc %>
      <dt>CC:</dt>
      <dd><%= mail.cc.join(", ") %></dd>
    <% end %>

    <% if mail.bcc %>
      <dt>BCC:</dt>
      <dd><%= mail.bcc.join(", ") %></dd>
    <% end %>
  </dl>

  <% if mail.multipart? %>
    <p class="alternate">
      <% if type == "plain" %>
        <a href="rich.html">View HTML version</a>
      <% else %>
        <a href="plain.html">View plain text version</a>
      <% end %>
    </p>
  <% end %>
</div>

<% if type == "plain" %>
  <pre id="message_body"><%= CGI.escapeHTML(body) %></pre>
<% else %>
  <%= body %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
letter_opener-0.1.0 lib/letter_opener/message.html.erb