3
def create_email_body_ganglia(array,title,heading1,heading2,heading3,heading4)
  custom_rows =""
  array.each_slice(4) do |row|
  custom_rows << "<tr><td>#{row[0]}</td><td>#{row[1]}</td><td>#{row[2]}</td><td>#{row[3]}</td></tr>"
  end
message = <<MESSAGE_END

Rubyコードの配列から要素を挿入して<td>から、それを電子メールで送信することにより、htmlテーブルを動的に形成しようとしています。
しかし、受信した電子メールには、挿入する要素が example.com の形式であるため、html コンテンツがリンクとして表示されます。

それらをテキストとして表示することはできますか?

4

1 に答える 1

0

以下のスクリプト行を使用して、リンクの外観を変更できます。

a:link {text-decoration: none; color: black;}               
a:visited {text-decoration: none; color: black;}               
a:active {text-decoration: none; color: black;}             
a:hover {text-decoration: none; color: black;}

これらは、eamils だけでなく、Web ページ内のリンクされたテキストに対しても機能します。

于 2012-12-29T04:45:51.123 に答える