當我在電子郵件正文中添加HTML URL時,它不會重定向到首選位置。這是片段,請告訴我我做錯了什麼。Java電子郵件嵌入URL
#location variable contains the URL
StringBuffer body = new StringBuffer("<html><body>Hi, <br/><br/>");
body.append("<p>"+cmts+"</p>");
#both the ways are not working, how to construct proper URL
body.append("<br/><br/><a href=\"+location+\">" + location + "</a><br/>");
body.append("<br/><br/><a href="+location+">" +location + "</a><br/>");
#this is working as link only in OUTLOOK, but in other mail client it shows as plain text
body.append("<br/><br/>"+location);
網址:
http://host:port/weebApp/report/viewer.html#%2Fpublic%2FSamples%2FDashboards%2_FSample_report
您可以添加您正在使用的URL的示例嗎? – FuePi
首先檢查這個沒有javaMail的URL是否正常工作?似乎我沒有工作 – Ghayel
@Ghayel在代碼片段中提到Last Statement,就是說它工作正常。但是當我查看Outlook以外的其他客戶端時,它顯示爲純文本bcoz,它不包含在中。我希望那個標籤在。 – GeekExplorer