0 Replies Latest reply on Mar 18, 2015 6:54 AM by Manoj Busupalli

    Configuring Jboss to send mails from Microsoft Exchange server using Java Mail API

    Manoj Busupalli Newbie

      We have a requirement to send mails from microsoft exchange server using java mail api and JBoss AS 7.1.2.FINAL.

      I am able send mails using gmail smtp server from jboss. Configuration is given below.

         <profile> 
          
      <subsystem xmlns="urn:jboss:domain:mail:1.0">
            
      <mail-session jndi-name="java:jboss/mail/Default">
              
      <smtp-server ssl="true" outbound-socket-binding-ref="mail-smtp">
                
      <login name="emailid@gmail.com" password="password"/>
              
      </smtp-server>
            
      </mail-session>
          
      </subsystem>
       
      </profile>
       
      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
         
      <outbound-socket-binding name="mail-smtp">
           
      <remote-destination host="smtp.gmail.com" port="465"/>
         
      </outbound-socket-binding>
       
      </socket-binding-group>

      But, smtp is not enabled for our server. I am able to send mails from microsfot exchange server using EWS java api from normal java class and not from jboss.

      In wildfly, <custom-server> element is introducted under <mail-session> element in addition to existing SMTP, POP3 and IMAP servers. Is it for supporting servers like microsoft exchange server? I am unable to find documentation for that custom-server tag. Please let me know if anyone knows why that tag is introduced and what it supports.

      Also let me know even if we can configure in any other versions of jboss.