当注册过程完成时,我会从我的 Play 应用程序中发送欢迎电子邮件……并且我想提供在客户端的 Web 浏览器中查看其内容的能力。我试过这样的东西......
@(title: String)(content: Html)
...
<html>
<head>
<title>@title</title>
...
</head>
...
<p>Trouble viewing this email? <a href="@views.html.emails.email(title)(content)">View in Browser</p>
...
<body>
@content
</body>
</html>
...但是这段代码总是以 [StackOverflowError: null] 结尾:
In /home/j3d/Projects/test/app/views/mails/email.scala.html at line 8.
5 <html>
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <title>@title</title>
9 <style type="text/css">
10 a { color: #4A72AF; }
11 body, #header h1, #header h2, p { margin: 0; padding: 0; }
12 #main { border: 1px solid #cfcece; }
任何帮助将不胜感激:-) 谢谢。