Page 1 of 1

mail notification issue

PostPosted:Tue Mar 15, 2011 4:58 pm
by ming543
Hi Sir,
When I try to setup mail notification I got some error,
my mail-service.xml is
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mail-service.xml 62349 2007-04-15 16:48:15Z dimitris@jboss.org $ -->
<server>

  <!-- ==================================================================== -->
  <!-- Mail Connection Factory                                              -->
  <!-- ==================================================================== -->

<mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
  <attribute name="JNDIName">java:/mail/OpenKM</attribute>

    <attribute name="User">efcotec@gmail.com</attribute>
    <attribute name="Password">openkmpass</attribute>
    <attribute name="Configuration">
      <!-- A test configuration -->
      <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="efcotec@gmail.com"/>

        <!-- Change to the mail server  -->
        <property name="mail.pop3.host" value="pop.gmail.com"/>

        <!-- Change to the SMTP gateway server -->
        <property name="mail.smtp.host" value="smtp.gmail.com"/>
        <property name="mail.smtp.starttls.enable" value="true" />
        <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />

        <!-- The mail server port -->
        <property name="mail.smtp.port" value="465"/>
        <property name="mail.smtp.socketFactory.port" value="465" />

        <!-- Change to the address mail will be from  -->
        <property name="mail.from" value="efcotec@gmail.com"/>
        <property name="mail.smtp.user" value="efcotec@gmail.com"/>
        <property name="mail.smtp.password" value="openkmpass"/>
        <property name="mail.smtp.auth" value="true"/>

        <!-- Enable debugging output from the javamail classes -->
        <property name="mail.debug" value="false"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>

  <!-- OpenKM -->
  <mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
    <attribute name="JNDIName">java:/mail/OpenKM</attribute>
    <attribute name="User">efcotec@gmail.com</attribute>
    <attribute name="Password">openkmpass</attribute>
    <attribute name="Configuration">
      <configuration>
        <property name="mail.transport.protocol" value="smtp"/>
        <property name="mail.smtp.host" value="smtp.gmail.com"/>
        <property name="mail.smtp.port" value="465"/>
        <property name="mail.from" value="efcotec@gmail.com"/>
        <property name="mail.debug" value="false"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>
The server.log show some error as
Code: Select all
2011-03-16 00:48:58,425 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/D:/Download/jboss-4.2.3.GA/server/default/deploy/mail-service.xml

************************************************************************************

2011-03-16 00:49:36,469 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@a105c782 { url=file:/D:/Download/jboss-4.2.3.GA/server/default/deploy/mail-service.xml }
  deployer: org.jboss.deployment.SARDeployer@c837cd
  status: Deployment FAILED reason: Trying to install an already registered mbean: jboss:service=OpenKM
  state: FAILED
  watch: file:/D:/Download/jboss-4.2.3.GA/server/default/deploy/mail-service.xml
  altDD: null
  lastDeployed: 1300207738403
  lastModified: 1300207738397
  mbeans:

do you have idea what kinds issue I meet?



*******************************************************************************************************
I modify the mail-service.xml to original
Code: Select all
  <mbean code="org.jboss.mail.MailService"
         name="jboss:service=Mail">
    <attribute name="JNDIName">java:/Mail</attribute>
the error can't find when bootup, but when system send notice to user,
it's will hand up about 10 mins, I think system can't access to gmail.

Re: mail notification issue

PostPosted:Wed Mar 16, 2011 4:00 pm
by jllort
Only must be one
Code: Select all
<!-- OpenKM -->
  <mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
into the mail-service.xml

Re: mail notification issue

PostPosted:Thu Mar 17, 2011 8:37 am
by ming543
Hi Jllort,
I remove one of mbean, but still same result.
Code: Select all
<mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
</mbean>
anyway, I use the mail server support smtp port:25 then notification work,
the issue I got should SSL or TSL on gmail.

Re: mail notification issue

PostPosted:Fri Mar 18, 2011 9:23 am
by jllort
The gmail example be sure it runs right http://wiki.openkm.com/index.php/JBoss_ ... figuration