[jboss-user] [JBoss Seam] - Mail sending error

demetrio812 do-not-reply at jboss.com
Wed May 16 13:03:32 EDT 2007

I have this mail template:

  | <m:message xmlns="http://www.w3.org/1999/xhtml"
  |     xmlns:m="http://jboss.com/products/seam/mail"
  |     xmlns:h="http://java.sun.com/jsf/html">
  |     <m:from name="Upload4Freedom" address="info at upload4freedom.com" />
  |     <m:to name="info">filocamo at demetrio.it</m:to>
  |     <m:subject>Message from Contact Form</m:subject>
  |     <m:body>
  |         <p>
  |         	<h:outputText value="Name: #{ContactForm.name}" />
  |         	<h:outputText value="E-mail: #{ContactForm.email}" />
  |         	<h:outputText value="Message: #{ContactForm.msg}" />
  |         </p>
  |     </m:body>
  | </m:message>

and I'm trying to send it with this method:

  |     public void sendEmail()
  | 	{
  | 		try {
  | 		   renderer.render("/mailTemplate.xhtml");
  | 		   facesMessages.add("E-mail sent, thank you!");
  | 		} 
  | 		catch (Exception e) {
  | 		   facesMessages.add("Email sending failed: " + e.getMessage());
  | 		}
  | 	}

I also tried various combination of configuration in components.xml, like this:

  | <mail:mail-session host="smtp.tiscali.it" port="25" debug="true" ssl="false" />


  | <mail:mail-session host="smtp.tiscali.it" port="25" username="" password="" debug="true" ssl="false" />

but the error I got is:

  | No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>

How can I solve this problem? I use the latest version of seam with JBoss AS.

Thanks a lot!

Demetrio Filocamo
(filocamo at demetrio.it)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046229#4046229

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046229

More information about the jboss-user mailing list