Hi suresh,

Seem like the issue is with the SMTP server certificate. Have you added
your SMTP server's certificate to the keystore?

Regards,

On Thu, Mar 24, 2016 at 9:10 AM, Kamidu Punchihewa <[email protected]>
wrote:

> Hi Suresh,
>
> Can you kindly provide the new mailto configuration.
>
> Thnaks,
>
> Kamidu Sachith Punchihewa
> *Software Engineer*
> WSO2, Inc.
> lean . enterprise . middleware
> Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194>
>
>
> Disclaimer: This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may have
> received this communication in error, please reply to the sender indicating
> that fact and delete the copy you received and in addition, you should not
> print, copy, retransmit, disseminate, or otherwise use the information
> contained in this communication. Internet communications cannot be
> guaranteed to be timely, secure, error or virus-free. The sender does not
> accept liability for any errors or omissions.
>
> On Wed, Mar 23, 2016 at 5:11 PM, Suresh Kumar <[email protected]>
> wrote:
>
>> Hi Sachith
>>
>>
>> I tried as you mentioned, changed the 'axis2_client.xml' instead of
>> axis2.xml however I'm getting following exception, Kindly help out
>>
>>
>> [2016-03-23 16:52:38,756] ERROR
>> {org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl} -
>> Error in delivering the message, subject: 'Enroll your Device
>>  with WSO2 MDM', to: '[email protected]'
>> org.apache.axis2.AxisFault: The system cannot infer the transport
>> information from the mailto:[email protected] URL.
>>         at
>> org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81)
>>         at
>> org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:288)
>>         at
>> org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:249)
>>         at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
>>         at
>> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.java:511)
>>         at
>> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.java:488)
>>         at
>> org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl$EmailSender.run(EmailServiceProviderImpl.java:109)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>> Source)
>>         at java.util.concurrent.FutureTask.run(Unknown Source)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
>> Source)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>>         at java.lang.Thread.run(Unknown Source)
>>
>> Thanks
>>
>> Suresh K
>> ------------------------------
>> *From:* Suresh Kumar
>> *Sent:* Wednesday, March 23, 2016 4:24 PM
>> *To:* Kamidu Punchihewa
>>
>> *Subject:* Re: Device Enrollment Failed - WSO2 EMM 2.0
>>
>>
>> Thanks Sachith , I will try and i will update.
>>
>>
>>
>>
>> ------------------------------
>> *From:* Kamidu Punchihewa <[email protected]>
>> *Sent:* Wednesday, March 23, 2016 4:16 PM
>> *To:* Suresh Kumar
>> *Subject:* Re: Device Enrollment Failed - WSO2 EMM 2.0
>>
>> Hi Suresh,
>>
>> Please move the mailto configuration to axis2_client.xml from axis2.xml.
>>
>> You can find a sample configuration given below.
>>
>> *<transportSender name="mailto"*
>>
>> *class="org.apache.axis2.transport.mail.MailTransportSender">*
>>
>> *<parameter name="mail.smtp.from">*******@gmail.com
>>> <[email protected]></parameter>*
>>
>> *<parameter name="mail.smtp.user">*******@gmail.com
>>> <[email protected]></parameter>*
>>
>> *<parameter name="mail.smtp.password">******</parameter>*
>>
>> *<parameter name="mail.smtp.host">smtp.gmail.com
>>> <http://smtp.gmail.com></parameter>*
>>
>> *<parameter name="mail.smtp.port">587</parameter>*
>>
>> *<parameter name="mail.smtp.starttls.enable">true</parameter>*
>>
>> *<parameter name="mail.smtp.auth">true</parameter> *
>>
>> *</transportSender> *
>>
>>
>> Feel free to raise any double regarding wso2 EMM. You can utilities
>> [email protected] public mail to discuss any topic related to wso2 products.
>>
>> Thanks and Best Regards,
>>
>> Kamidu Sachith Punchihewa
>> *Software Engineer*
>> WSO2, Inc.
>> lean . enterprise . middleware
>> Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194>
>>
>>
>> Disclaimer: This communication may contain privileged or other
>> confidential information and is intended exclusively for the addressee/s.
>> If you are not the intended recipient/s, or believe that you may have
>> received this communication in error, please reply to the sender indicating
>> that fact and delete the copy you received and in addition, you should not
>> print, copy, retransmit, disseminate, or otherwise use the information
>> contained in this communication. Internet communications cannot be
>> guaranteed to be timely, secure, error or virus-free. The sender does not
>> accept liability for any errors or omissions.
>>
>> On Wed, Mar 23, 2016 at 1:53 PM, Suresh Kumar <[email protected]
>> > wrote:
>>
>>> Hi Sachith
>>>
>>>
>>> Nice talking with you , Let me explain the problem which i'm facing
>>>
>>>
>>> I have hosted WSO2 EMM in windows 10, configured the email setup in
>>> \wso2emm-2.0.0\repository\conf\axis2\axis.xml, The WSO2 EMM is hosted with
>>> public IP. When i tried to register the user after successful registration
>>> EMM will send an device enrollment email which is not getting generated.
>>>
>>>
>>> Please find the below SMTP configuration details
>>>
>>>
>>> (I have masked the smtp user,password, from for security purpose it's
>>> confidential it's one of my client SMTP details. However in my local when i
>>> use SMTP host as smtp.gmail.com and used gmail credential it is working
>>> fine)
>>>
>>>
>>>  <transportSender name="mailto"
>>> class="org.apache.axis2.transport.mail.MailTransportSender">
>>>         <parameter name="mail.smtp.host">10.102.5.101</parameter>
>>>         <parameter name="mail.smtp.port">25</parameter>
>>>         <parameter name="mail.smtp.starttls.enable">true</parameter>
>>>         <parameter name="mail.smtp.auth">true</parameter>
>>>         <parameter name="mail.smtp.user">[email protected]</parameter>
>>>         <parameter name="mail.smtp.password">xxxxxx</parameter>
>>>         <parameter name="mail.smtp.from">[email protected]</parameter>
>>>     </transportSender>
>>>
>>>
>>> *Exception :- *
>>>
>>>
>>>
>>> [2016-03-23 12:47:58,965] ERROR
>>> {org.wso2.carbon.device.mgt.core.email.sender.Em
>>> ailServiceProviderImpl} -  Error in delivering the message, subject:
>>> 'Enroll you
>>> r Device with WSO2 MDM', to: '[email protected]'
>>> org.apache.axis2.AxisFault: Error generating mail message
>>>         at
>>> org.apache.axis2.transport.base.AbstractTransportSender.handleExcepti
>>> on(AbstractTransportSender.java:226)
>>>         at
>>> org.apache.axis2.transport.mail.MailTransportSender.sendMessage(MailT
>>> ransportSender.java:184)
>>>         at
>>> org.apache.axis2.transport.base.AbstractTransportSender.invoke(Abstra
>>> ctTransportSender.java:112)
>>>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>>>         at
>>> org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(O
>>> utOnlyAxisOperation.java:297)
>>>         at
>>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:
>>> 149)
>>>         at
>>> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.jav
>>> a:511)
>>>         at
>>> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.jav
>>> a:488)
>>>         at
>>> org.wso2.carbon.device.mgt.core.email.sender.EmailServiceProviderImpl
>>> $EmailSender.run(EmailServiceProviderImpl.java:109)
>>>         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>>> Source)
>>>         at java.util.concurrent.FutureTask.run(Unknown Source)
>>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
>>> Source)
>>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>> Source)
>>>         at java.lang.Thread.run(Unknown Source)
>>> Caused by: org.apache.axis2.AxisFault: Error creating mail message or
>>> sending it
>>>  to the configured server
>>>         at
>>> org.apache.axis2.transport.base.AbstractTransportSender.handleExcepti
>>> on(AbstractTransportSender.java:226)
>>>         at
>>> org.apache.axis2.transport.mail.MailTransportSender.sendMail(MailTran
>>> sportSender.java:505)
>>>         at
>>> org.apache.axis2.transport.mail.MailTransportSender.sendMessage(MailT
>>> ransportSender.java:175)
>>>         ... 12 more
>>> Caused by: javax.mail.MessagingException: Can't send command to SMTP
>>> host;
>>>   nested exception is:
>>>         javax.net.ssl.SSLHandshakeException:
>>> sun.security.validator.ValidatorExc
>>> eption: PKIX path building failed:
>>> sun.security.provider.certpath.SunCertPathBui
>>> lderException: unable to find valid certification path to requested
>>> target
>>>         at
>>> com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)
>>>         at
>>> com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)
>>>         at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)
>>>         at
>>> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:38
>>> 4)
>>>         at javax.mail.Service.connect(Service.java:297)
>>>         at javax.mail.Service.connect(Service.java:156)
>>>         at javax.mail.Service.connect(Service.java:105)
>>>         at javax.mail.Transport.send0(Transport.java:168)
>>>         at javax.mail.Transport.send(Transport.java:98)
>>>         at
>>> org.apache.axis2.transport.mail.MailTransportSender.sendMail(MailTran
>>> sportSender.java:494)
>>>         ... 13 more
>>> Caused by: javax.net.ssl.SSLHandshakeException:
>>> sun.security.validator.Validator
>>> Exception: PKIX path building failed:
>>> sun.security.provider.certpath.SunCertPath
>>> BuilderException: unable to find valid certification path to requested
>>> target
>>>         at sun.security.ssl.Alerts.getSSLException(Unknown Source)
>>>         at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
>>>         at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
>>>         at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
>>>         at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown
>>> Source)
>>>         at sun.security.ssl.ClientHandshaker.processMessage(Unknown
>>> Source)
>>>         at sun.security.ssl.Handshaker.processLoop(Unknown Source)
>>>         at sun.security.ssl.Handshaker.process_record(Unknown Source)
>>>         at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
>>>         at
>>> sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source
>>> )
>>>         at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
>>>         at sun.security.ssl.AppOutputStream.write(Unknown Source)
>>>         at
>>> com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)
>>>
>>>         at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
>>>         at java.io.BufferedOutputStream.flush(Unknown Source)
>>>         at
>>> com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1418)
>>>         ... 22 more
>>> Caused by: sun.security.validator.ValidatorException: PKIX path building
>>> failed:
>>>  sun.security.provider.certpath.SunCertPathBuilderException: unable to
>>> find vali
>>> d certification path to requested target
>>>         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
>>>         at sun.security.validator.PKIXValidator.engineValidate(Unknown
>>> Source)
>>>         at sun.security.validator.Validator.validate(Unknown Source)
>>>         at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
>>>         at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown
>>> Source)
>>>         at
>>> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Sour
>>> ce)
>>>         ... 34 more
>>> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
>>> unable to
>>>  find valid certification path to requested target
>>>         at
>>> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
>>>  Source)
>>>         at java.security.cert.CertPathBuilder.build(Unknown Source)
>>>         ... 40 more
>>>
>>>
>>>
>>> Kindly help out
>>>
>>>
>>> Thanks
>>>
>>> Suresh K
>>>
>>
>>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Milan Perera *| Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 77 309 7088 | Work: +94 11 214 5345
Email: [email protected] <[email protected]> | Web: www.wso2.com
<http://lk.linkedin.com/in/milanharinduperera>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to