4 Replies Latest reply on Sep 26, 2006 4:06 PM by Ypatios Asmanidis

    Jboss mail-service.xml localhost, port 25

    Ypatios Asmanidis Newbie

      I change the mail-service.xml to

      <server>
      
       <!-- ==================================================================== -->
       <!-- Mail Connection Factory -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.mail.MailService"
       name="jboss:service=Mail">
       <attribute name="JNDIName">java:/Mail</attribute>
       <attribute name="User">some</attribute>
       <attribute name="Password">some1</attribute>
       <attribute name="Configuration">
       <!-- Test -->
       <configuration>
       <!-- Change to your mail server prototocol -->
       <property name="mail.store.protocol" value="pop3"/>
       <property name="mail.transport.protocol" value="smtp"/>
      
       <!-- Change to the user who will receive mail -->
       <property name="mail.user" value="myname@test.com"/>
      
       <!-- Change to the mail server -->
       <property name="mail.pop3.host" value="pop.test.com"/>
      
       <!-- Change to the SMTP gateway server -->
       <property name="mail.smtp.host" value="smtp.test.com"/>
      
       <!-- Change to the address mail will be from -->
       <property name="mail.from" value="me@test.com"/>
      
       <!-- Enable debugging output from the javamail classes -->
       <property name="mail.debug" value="false"/>
       </configuration>
       <depends>jboss:service=Naming</depends>
       </attribute>
       </mbean>
      
      </server>
      


      but when I'm trying to send an email through seam I get the exception


       javax.mail.SendFailedException: Sending failed;
       nested exception is:
       class javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
       nested exception is:
       java.net.ConnectException: Connection refused
      
      


      the pop3 and smtp server are in a different machine than the machine I'm running the app and in this machine there is no sendmail running. Is this the problem?should I run sendmail to this machine as well?