1

我正在尝试使用 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 没有被实例化。你能告诉我有什么问题吗?

4

0 回答 0