Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-807

servicemix-mail - Is not compatible with Java Mail 1.4.3 - Tries to authenticate with empty username/password

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • servicemix-mail-2010.01
    • 2010.02
    • servicemix-mail
    • None

    Description

      I have run into an issue with using the servicemix-mail component. We have an application that sends out emails over SMTP using an anonymous connection.

      Caused by: javax.mail.AuthenticationFailedException: 535 5.7.0 authentication failed
              at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
              at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
              at javax.mail.Service.connect(Service.java:313)
              at org.apache.servicemix.mail.MailSenderEndpoint.sendMail(MailSenderEndpoint.java:180)
              at org.apache.servicemix.mail.MailSenderEndpoint.processInOut(MailSenderEndpoint.java:131)
              at org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:111)
              at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)
              at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)
              at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:525)
              at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
              at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:632)
              at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:185)
              at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
              at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:636)
      

      I created a very basic test project to reproduce the error and I have attached the xbean.xml from my test project. As you can see, I am setting the mail.smtp,auth to "false" in the custom props. So I am not sure why it is now trying to authenticate. Please let me know how I can fix this issue so that I don't have to provide credentials to send out email. Or if that's been removed in this version.

      Here is the xbean.xml

      <beans xmlns:mail="http://servicemix.apache.org/mail/1.0"
             xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:util="http://www.springframework.org/schema/util"
             xsi:schemaLocation="http://servicemix.apache.org/mail/1.0 http://servicemix.apache.org/schema/servicemix-mail-3.2.3.xsd
             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 
       
      	
        <mail:sender service="ahc:MailService" 
                     endpoint="mailOut"
                     sender="me@bar.com"                 
                     receiver="you@bar.com"
                     debugMode="false" 
                     connection="smtp://smtp.bar.com"                 
                     customProperties="#smtpCustomProps"> 
        </mail:sender>			
      	
        <util:map id="smtpCustomProps"> 
          <entry key="mail.smtp.connectiontimeout" value="60000"/> 
          <entry key="mail.smtp.timeout" value="60000"/> 
          <entry key="mail.smtp.auth" value="false"/>		
        </util:map> 
      </beans> 
      

      Attachments

        1. SMX-807.patch
          0.8 kB
          Claus Ibsen

        Activity

          People

            ffang Freeman Yue Fang
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: