生成的电子邮件中未显示带有链接的行

时间:2012-09-05 09:41:16

标签: html email grails

我的应用需要在用户提出时发送生成的电子邮件。电子邮件发送没有问题(我在Grails中使用Mail插件)但是,里面有一行链接是整个邮件的目的。但是,在电子邮件中没有看到它。代码是这样的:

'<head>'+
    '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'+
'</head>'+
    '<body>'+
        '<table width="690px" height="390px;" border="0px;font-family:verdana">'+
                    '<tr>'+
                    '<td>'+
'<p style="font-size: 14px;line-height: 1.5;margin-bottom: 10px;margin-left: 25px;text-align: left;">Blahblahblah this is the URL:</p>'+
        '</td>'+
        '</tr>'+
        '<tr>'+
        '<td>'+
            '<p style="font-size: 14px;line-height: 1.5;margin-bottom: 10px;margin-left: 25px;text-align: left;"><a href="http://www.myurl.com/promocion/verPromocion?promocion='+promocion.nombre+'&recomendador='+compradorInstance.id+'"> </a> </p>'+
        '</td>'+
        '</tr>'+
    </table>
'</body>'

我可以看到&lt;“p”&gt;绘制是因为链接应该是空的空格,但链接未显示。谁知道为什么?谢谢。

1 个答案:

答案 0 :(得分:0)

解决了...只需复制粘贴和之间的网址。这样:

'<p style="font-size: 14px;line-height: 1.5;margin-bottom: 10px;margin-left: 25px;text-align: left;"><a href="http://www.tikcode.com/promocion/verPromocion?promocion='+promocion.nombre+'&recomendador='+compradorInstance.id+'"> http://www.tikcode.com/promocion/verPromocion?promocion='+promocion.nombre+'&recomendador='+compradorInstance.id+'</a> </p>'+

现在它显示得很好。