4 Replies Latest reply on Apr 6, 2007 1:17 AM by ravindra reddy

    mail alerts in JBoss Forums

    ravindra reddy Newbie

      i am using version JBoss Portal 2.6 alpha2
      JBoss Forums beta 1.0(compatible with above portal version)

      content of "JBOSS_HOME/server/default/deploy/mailservice.xml" file is

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server>
      <!-- $Id: mail-service.xml 31716 2005-06-01 06:20:43Z starksm $ -->
      
      <server>
      
      
       <mbean code="org.jboss.mail.MailService"
       name="jboss:service=Mail">
       <attribute name="JNDIName">java:/Mail</attribute>
       <attribute name="User">nobody</attribute>
       <attribute name="Password">password</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="nobody"/>
      
       <!-- Change to the mail server -->
       <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
      
       <!-- Change to the SMTP gateway server -->
       <property name="mail.smtp.host" value="localhost"/>
      
       <!-- Change to the address mail will be from -->
       <property name="mail.from" value="ravi@localhost.com"/>
      
       <!-- Enable debugging output from the javamail classes -->
       <property name="mail.debug" value="true"/>
       </configuration>
       <depends>jboss:service=Naming</depends>
       </attribute>
       </mbean>
      
      </server>
      


      just check above code what else i have to modify to activate mail alert service.



      what i have to mention here?

       <!-- Change to the user who will receive mail -->
       <property name="mail.user" value="nobody"/>
      
      


      since there may be many users working on forums many may receive email notifications. what actually i have to mention in value attribute here?


      there is a lot of confusion for me specifically regarding this mail alerts. hope someone will resolve.

        • 1. Re: mail alerts in JBoss Forums
          Ryszard Kozmik Master

          Hello

          I see you turned on debug mode. So, please subscribe with one user to topic/forum and then with second user post on this topic/forum and please paste here debug information from your AS console, it should tell us where the problem is.

          Regards
          ----------------------
          Ryszard Kozmik
          JBoss Forums Lead
          JBoss Labs Team

          • 2. Re: mail alerts in JBoss Forums
            ravindra reddy Newbie

             

            <!-- Change to the user who will receive mail -->
             <property name="mail.user" value="nobody"/>


            there may be many users, so it may not be possible to mention the user who will receive mail. can i keep the value as nobody.

            consider i am working in domain 'abc.com'


            <!-- Change to the address mail will be from -->
             <property name="mail.from" value="nobody@nosuchhost.nosuchdomain.com"/>


            so mail id will be some ravindra@abc.com

            <!-- Change to the SMTP gateway server -->
             <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>


            what will be this SMTP gate server

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


            what will be this mail server?



            • 3. Re: mail alerts in JBoss Forums
              Ryszard Kozmik Master

              Hi

              "ravindra reddy" wrote:
              there may be many users, so it may not be possible to mention the user who will receive mail. can i keep the value as nobody .

              In fact, this property is overrided by Forums. Instead of this "nobody" you will see idName of user which posted.

              "ravindra reddy" wrote:
              so mail id will be some ravindra@abc.com

              mail.from property is also overriden and you can set it in Forums : jboss-forums.ear/portal-forums.sar/META-INF/jboss-service.xml . By default it is set to portal@example.com.

              "ravindra reddy" wrote:
              what will be this SMTP gate server

              URL to server which runs SMTP service. Your MacOS should have it running, so for testing you might insert here "localhost".

              "ravindra reddy" wrote:
              what will be this mail server?

              POP3 is not important as this configuration is needed for receiving e-mails. Forums don't have yet functionality for replying to posts by e-mail, so this property is now useless.

              Today I configured e-mail notification in one of my instances. From the configuration point of view all I did was changing SMTP server address to "localhost" and setting up debug mode to true.
              Then:
              1. started AS
              2. logged in as one user and subscribed to one of forums
              3. logged out
              4. logged in as a different user(different user needed because user posting on subscribed topic is not notified) and posted on the same forum
              5. In my log I saw full information about properly constructed and sent e-mail message and in a few seconds I received the e-mail on one of my mail accounts.

              Simple isn't it? ;-)

              Regards
              ----------------------
              Ryszard Kozmik
              JBoss Forums Lead
              JBoss Labs Team

              • 4. Re: mail alerts in JBoss Forums
                ravindra reddy Newbie

                thank you unibrew
                i will go ahead with your suggetions and moreover it looks like very simple