0

I'm trying to send an HTML email through rails but it keeps displaying with Times New Roman on Outlook Gmail on Linux renders it correctly, Gmail on Windows also renders it correctly When I receive on Outlook, it shows a button "show this email on browser" or something like that, and it shows it correct there I've tried to add a font-family tag on the body, in a specific element but it just doesn't seems to matters

this is the HTML code rendered on Gmail

<div style="line-height:20px;color:#333333;font-size:12px;font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;margin:0">
<table cellpadding="20">
<tbody><tr>
<td>
<img alt="Logo" src="http://www.simplificpavarini.com.br/assets/logo.png">
</td>
</tr>
<tr>
<td>
<h3 style="color:#b0232a;margin-bottom:20px">Cotas Diárias - 26/07/2013</h3>
<table style="width:800px;line-height:20px;margin-bottom:20px;border-bottom:1px solid #dddddd">
<thead><tr style="background-color:#ddd">
<th style="width:70px;padding:6px;text-align:left;width:160px">Fundos</th>
<th style="width:70px;text-align:center;padding:6px;width:120px">Cota</th>
<th style="width:70px;text-align:center;padding:6px">Dia</th>
<th style="width:70px;text-align:center;padding:6px">Mês</th>
<th style="width:70px;text-align:center;padding:6px">Ano</th>
<th style="width:70px;text-align:center;padding:6px">12m </th>
<th style="width:70px;text-align:center;padding:6px">PL*</th>
<th style="width:70px;text-align:center;padding:6px">PL 12m*</th>
</tr></thead>
<tbody>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA ALLOCATION FIC FIM</td>
<td style="width:70px;padding:6px;text-align:left">
22,89476146
</td>
<td style="width:70px;text-align:center;padding:6px">0,10%</td>
<td style="width:70px;text-align:center;padding:6px">0,22%</td>
<td style="width:70px;text-align:center;padding:6px">2,90%</td>
<td style="width:70px;text-align:center;padding:6px">7,55%</td>
<td style="width:70px;text-align:center;padding:6px">45.526</td>
<td style="width:70px;text-align:center;padding:6px">45.649</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">% CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">322%</td>
<td style="width:70px;text-align:center;padding:6px">55%</td>
<td style="width:70px;text-align:center;padding:6px">76%</td>
<td style="width:70px;text-align:center;padding:6px">109%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA SELECTION FIC FIM</td>
<td style="width:70px;padding:6px;text-align:left">
2,39205680
</td>
<td style="width:70px;text-align:center;padding:6px">-0,04%</td>
<td style="width:70px;text-align:center;padding:6px">0,15%</td>
<td style="width:70px;text-align:center;padding:6px">2,75%</td>
<td style="width:70px;text-align:center;padding:6px">5,93%</td>
<td style="width:70px;text-align:center;padding:6px">3.083</td>
<td style="width:70px;text-align:center;padding:6px">3.926</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">% CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">-</td>
<td style="width:70px;text-align:center;padding:6px">37%</td>
<td style="width:70px;text-align:center;padding:6px">72%</td>
<td style="width:70px;text-align:center;padding:6px">86%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA AÇÕES FIC FIA</td>
<td style="width:70px;padding:6px;text-align:left">
12.285,04135694
</td>
<td style="width:70px;text-align:center;padding:6px">0,72%</td>
<td style="width:70px;text-align:center;padding:6px">-1,42%</td>
<td style="width:70px;text-align:center;padding:6px">-5,49%</td>
<td style="width:70px;text-align:center;padding:6px">3,08%</td>
<td style="width:70px;text-align:center;padding:6px">20.227</td>
<td style="width:70px;text-align:center;padding:6px">20.245</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">Vs. Ibovespa</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">-0.87%</td>
<td style="width:70px;text-align:center;padding:6px">-0.18%</td>
<td style="width:70px;text-align:center;padding:6px">17.61%</td>
<td style="width:70px;text-align:center;padding:6px">19.53%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
</tbody>
</table>
<table style="width:800px;line-height:20px;margin-bottom:20px;border-bottom:1px solid #dddddd">
<thead><tr style="background-color:#ddd">
<th style="width:70px;padding:6px;text-align:left;width:160px">Índices</th>
<th style="width:70px;text-align:center;padding:6px;width:120px"></th>
<th style="width:70px;text-align:center;padding:6px">Dia</th>
<th style="width:70px;text-align:center;padding:6px">Mês</th>
<th style="width:70px;text-align:center;padding:6px">Ano</th>
<th style="width:70px;text-align:center;padding:6px">12m</th>
<th style="width:70px;text-align:center;padding:6px"></th>
<th style="width:70px;text-align:center;padding:6px"></th>
</tr></thead>
<tbody>
<tr>
<td style="width:70px;padding:6px;text-align:left">CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">0,03%</td>
<td style="width:70px;text-align:center;padding:6px">0,12%</td>
<td style="width:70px;text-align:center;padding:6px">3,55%</td>
<td style="width:70px;text-align:center;padding:6px">6,60%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">Ibovespa</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">1,60%</td>
<td style="width:70px;text-align:center;padding:6px">-3,57%</td>
<td style="width:70px;text-align:center;padding:6px">-24,92%</td>
<td style="width:70px;text-align:center;padding:6px">-18,42%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
</tbody>
</table>
<div style="margin-top:20px;text-align:justify;font-size:10px">
* R$ Milhões
</div>
<div style="margin-top:20px;text-align:justify;font-size:10px">
<p style="margin:0 0 32px;margin-bottom:16px">
</td>
</tr>
</tbody></table>
</div>
4

1 回答 1

1

我懂了!我需要为表中的每个 td 定义字体大小和字体系列,所以我做了

* {
  font-family: ...
  font-size: ...
}
于 2013-08-01T14:06:41.967 回答