我正在尝试使用Liferay WebContent Velocity模板实例化MimeMessage类并且遇到困难。这是我的代码
#set ($properties = $portal.getClass().forName("java.util.Properties").newInstance())
#set ($VOID = $properties.put("mail.smtp.host","10.175.150.156"))
#set ($VOID = $properties.put("mail.smtp.host","25"))
#set ($mailSession = $portal.getClass().forName("javax.mail.Session").getInstance($properties, null))
Mail Session: $mailSession <br/>
#set ($mimeMessage = $portal.getClass().forName("javax.mail.internet.MimeMessage").newInstance($mailSession))
MimeMessage : $mimeMessage <br/>
这里$ mimeMessage没有被实例化。你能告诉我可能出现的问题吗?