English 中文(简体)
Using seam:mail in communication Driven Bean
原标题:Using seam:mail in Message Driven Bean

我很熟悉联几支助组,并要求自动建立电子邮件。 我喜欢“海洋”的想法:在“共同财产法”式中发出排时电子邮件,并使用共同财产基金的组成部分:

<m:message>
  <m:from name="Peter" address="peter@example.com" />
  <m:to name="#{person.firstname} #{person.lastname}">#{person.address}</m:to>
  <m:subject>Try out Seam!</m:subject>
  <m:body>
    <p><h:outputText value="Dear #{person.firstname}" />,</p>
    <p>You can try out Seam by visiting 
    <a href="http://example.com">http://example.com</a>.</p>
    <p>Regards,</p>
    <p>Pete</p>
  </m:body>
</m:message>

如我所知,Documentation,特别是这一snippet(shortened),

因此,现在你有电子邮件模板,你如何去发送? 诚然,在发出邮件时:要求邮件寄送电子邮件,因此,你们都必须请Seanm提出意见,

@In(create=true) private Renderer renderer;

public void send()
{
   renderer.render("/simple.xhtml");
   facesMessages.add("Email sent successfully");
} 

this is invoked in a common JSF (Facelet) page. Is there any chance to do this in a Message Driven Bean? Or should I head to other templating engines? see Suggestions for Java email templating?

问题回答

AFAIK 信使 Beans are for receive information。 我认为,这并不与你要求自动创建电子邮件有关。

任何途径,this Seam tutorial,告诉你如何随海而发送和接收JMS信息。 或许是为了你的目的,不管它是什么。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签