1

我使用邮件程序向包含优惠券的用户发送 HTML 丰富的电子邮件。每封电子邮件最多可能有大约 10 张优惠券,但我想为每封电子邮件添加一个打印链接,以便他们只打印那张。我怎样才能最好地完成这一点。

mail.html.erb(没有样式)

<body>
  <table width="100%" id="background" border="0" cellpadding="0" cellspacing="0">
    <tr><td align="center" valign="top">
      <table width="650" id="main" border="0" cellpadding="0" cellspacing="20">
        <tr>
          <td id="header" colspan="2">
            <a href="http://abc.com/"><img src="https://##.png" width="400" height="176" alt="Remindeals"></a>
            <h3>Hello <%= @user.name %>  this email is to remind you that you have  an occasion coming up in 2 weeks!</h3>
          </td>
        </tr>
        <tr>
          <td class="divider" colspan="2" bgcolor="#555555" height="2"></td>
        </tr>


        <% @deals.each do |d| %>
        <tr class="episode">
          <td>
            <a href="#"><img src="#.png" width="200" height="125" alt="#310 Getting Started with Rails"></a>
          </td>
          <td valign="top">
            <h2><%= d.store.name %></h2>
            <h2><%= d.title %></h2>
            <p><%= d.description %></p>
            <p>
              <a href="#">Print</a>

            </p>
          </td>
        </tr>
          <%end%>
      </table>
    </td></tr>
  </table>
</body>
4

0 回答 0