You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mike Oliver <Mi...@open4businessonline.com> on 2021/05/19 00:39:56 UTC
SMTPS Throws Error
Trying to use Camel to send an email but getting the following error...
javax.mail.MessagingException: Could not connect to SMTP host:
smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
at javax.mail.Service.connect(Service.java:366)
at org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:113)
at org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
The blueprint I am using is...
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="_deadletterchannelcontext1"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="_deadletterchannelroute1">
<from id="_from1" uri="direct-vm:deadletterchannel"/>
<log id="_log1" message="Dead Letter Channel body =
${body}, headers = ${headers}"/>
<to id="_to1"
uri="smtps:smtp.gmail.com:465?password=blablabla&from=yaddayadda@gmail.com&subject=Error+in+ESB&to=MikeOliverAZ@open4businessonline.com&username=mikeoliveraz@gmail.com"/>
<log id="_log2" message="After SMTPS send...body =
${body}, headers = ${headers}">
<description>See what comes out.</description>
</log>
</route>
</camelContext>
</blueprint>
*Mike Oliver** Founder**, Open 4 Business Online*
Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
US Toll free: 1-800-985-4766 **NEW*
http://www.o4bo.com
Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
[image: Facebook]
<http://www.facebook.com/pages/Open-4-Business-Online/147285608707176> [image:
Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
<http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
<https://angel.co/open-4-business-online/> [image: Blogger]
<http://blog.open4businessonline.com/> [image: eBay]
<http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
<http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
Plus Page] <https://plus.google.com/113688478700619104336/posts>
Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com [image:
Skype] MikeOliverAZ
Re: SMTPS Throws Error
Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
Hello,
If you are using Fuse from Red Hat, you should ask to the Red Hat support.
Cheers
--
Andrea Cosentino
----------------------------------
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@yahoo.com
Twitter: @oscerd2
Github: oscerd
On Thursday, May 20, 2021, 03:06:10 AM GMT+2, Mike Oliver <mi...@open4businessonline.com> wrote:
Claus,
Hmmmm ok trying to use google-mail component with the following context.
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="_deadletterchannelcontext1" xmlns="
http://camel.apache.org/schema/blueprint">
<route id="_deadletterchannelroute1">
<from id="_from1" uri="direct-vm:deadletterchannel"/>
<setHeader headerName="subject" id="_setHeader1">
<constant>Error Message</constant>
</setHeader>
<setBody id="_setBody1">
<constant>Helo World, Error Body!</constant>
</setBody>
<setHeader id="_setHeader2" headerName="to">
<constant>mikeoliveraz@open4businessonline.com</constant>
</setHeader>
<log id="_log1" message="Dead Letter Channel body = ${body},
headers = ${headers}"/>
<to id="_to1"
uri="google-mail:MESSAGES/send?accessToken="ya29.a0AfH6SMCrxMWrMRFjROZlNJdr01dBukZOSprV8auAv0SdvCqxCyNfP5Bn04V1hKr4thiA1dZanMtSERd1BlAG7j8YCcb3SG_S1uwJwOGb5aMcAND8_QFKZHUbSYWrVRS7UMhSlIYbykjqWoys2XbX1f-0kEiL"&applicationName=camel-google-mail/1.0"/>
</route>
</camelContext>
</blueprint>
mvn clean install build successful.
osgi:install -s also successful.
Blueprint bundle DeadLetterChannel/1.0.0.SNAPSHOT is waiting for
dependencies
[(&(component=google-mail)(objectClass=org.apache.camel.spi.ComponentResolver))]
so feature:install camel-google-mail
fails wtih
org.apache.felix.resolver.reason.ReasonException : Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=camel-quartz2;
type=karaf.feature; version="[2.23.2.fuse-790040,2.23.2.fuse-790040]";
filter:="(&(osgi.identity=camel-quartz2)(type=karaf.feature)(version>=2.23.2.fuse-790040)(version<=2.23.2.fuse-790040))"
I thought maybe I mistyped but camel-google-mail must have a dependency on
camel-quartz2
so tried feature:install camel-quartz2 and got...
org.apache.felix.resolver.reason.ReasonException : Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=camel-quartz2;
type=karaf.feature; version="[2.23.2.fuse-790040,2.23.2.fuse-790040]";
filter:="(&(osgi.identity=camel-quartz2)(type=karaf.feature)(version>=2.23.2.fuse-790040)(version<=2.23.2.fuse-790040))"
Now my fuse-karaf is 780038 not 790040 if that matters.
*Mike Oliver** Founder**, Open 4 Business Online*
Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
US Toll free: 1-800-985-4766 **NEW*
http://www.o4bo.com
Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
[image: Facebook]
<http://www.facebook.com/pages/Open-4-Business-Online/147285608707176> [image:
Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
<http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
<https://angel.co/open-4-business-online/> [image: Blogger]
<http://blog.open4businessonline.com/> [image: eBay]
<http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
<http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
Plus Page] <https://plus.google.com/113688478700619104336/posts>
Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com [image:
Skype] MikeOliverAZ
On Wed, May 19, 2021 at 12:44 PM Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Sending emails to google mail, via smtp is likely harder than trying
> to use the camel-google-mail component.
> If you need a test email server, then you can find smtp mail servers
> you can run as docker containers to use for testing purposes.
>
> On Wed, May 19, 2021 at 2:40 AM Mike Oliver
> <Mi...@open4businessonline.com> wrote:
> >
> > Trying to use Camel to send an email but getting the following error...
> >
> > javax.mail.MessagingException: Could not connect to SMTP host:
> > smtp.gmail.com, port: 465;
> > nested exception is:
> > javax.net.ssl.SSLHandshakeException: PKIX path building failed:
> > sun.security.provider.certpath.SunCertPathBuilderException: unable to
> > find valid certification path to requested target
> > at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
> > at
> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
> > at javax.mail.Service.connect(Service.java:366)
> > at
> org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:113)
> > at
> org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
> >
> >
> > The blueprint I am using is...
> >
> > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> > http://camel.apache.org/schema/blueprint
> > https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
> >
> > <camelContext id="_deadletterchannelcontext1"
> > xmlns="http://camel.apache.org/schema/blueprint">
> > <route id="_deadletterchannelroute1">
> > <from id="_from1" uri="direct-vm:deadletterchannel"/>
> > <log id="_log1" message="Dead Letter Channel body =
> > ${body}, headers = ${headers}"/>
> > <to id="_to1"
> > uri="smtps:
> smtp.gmail.com:465?password=blablabla&from=yaddayadda@gmail.com&subject=Error+in+ESB&to=MikeOliverAZ@open4businessonline.com&username=mikeoliveraz@gmail.com
> "/>
> > <log id="_log2" message="After SMTPS send...body =
> > ${body}, headers = ${headers}">
> > <description>See what comes out.</description>
> > </log>
> > </route>
> > </camelContext>
> > </blueprint>
> >
> >
> >
> >
> >
> > *Mike Oliver** Founder**, Open 4 Business Online*
> > Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
> > US Toll free: 1-800-985-4766 **NEW*
> > http://www.o4bo.com
> > Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
> > [image: Facebook]
> > <http://www.facebook.com/pages/Open-4-Business-Online/147285608707176>
> [image:
> > Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
> > <http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
> > <https://angel.co/open-4-business-online/> [image: Blogger]
> > <http://blog.open4businessonline.com/> [image: eBay]
> > <http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
> > <http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
> > Plus Page] <https://plus.google.com/113688478700619104336/posts>
> > Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com
> [image:
> > Skype] MikeOliverAZ
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
Re: SMTPS Throws Error
Posted by Mike Oliver <Mi...@open4businessonline.com>.
Claus,
Hmmmm ok trying to use google-mail component with the following context.
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="_deadletterchannelcontext1" xmlns="
http://camel.apache.org/schema/blueprint">
<route id="_deadletterchannelroute1">
<from id="_from1" uri="direct-vm:deadletterchannel"/>
<setHeader headerName="subject" id="_setHeader1">
<constant>Error Message</constant>
</setHeader>
<setBody id="_setBody1">
<constant>Helo World, Error Body!</constant>
</setBody>
<setHeader id="_setHeader2" headerName="to">
<constant>mikeoliveraz@open4businessonline.com</constant>
</setHeader>
<log id="_log1" message="Dead Letter Channel body = ${body},
headers = ${headers}"/>
<to id="_to1"
uri="google-mail:MESSAGES/send?accessToken="ya29.a0AfH6SMCrxMWrMRFjROZlNJdr01dBukZOSprV8auAv0SdvCqxCyNfP5Bn04V1hKr4thiA1dZanMtSERd1BlAG7j8YCcb3SG_S1uwJwOGb5aMcAND8_QFKZHUbSYWrVRS7UMhSlIYbykjqWoys2XbX1f-0kEiL"&applicationName=camel-google-mail/1.0"/>
</route>
</camelContext>
</blueprint>
mvn clean install build successful.
osgi:install -s also successful.
Blueprint bundle DeadLetterChannel/1.0.0.SNAPSHOT is waiting for
dependencies
[(&(component=google-mail)(objectClass=org.apache.camel.spi.ComponentResolver))]
so feature:install camel-google-mail
fails wtih
org.apache.felix.resolver.reason.ReasonException : Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=camel-quartz2;
type=karaf.feature; version="[2.23.2.fuse-790040,2.23.2.fuse-790040]";
filter:="(&(osgi.identity=camel-quartz2)(type=karaf.feature)(version>=2.23.2.fuse-790040)(version<=2.23.2.fuse-790040))"
I thought maybe I mistyped but camel-google-mail must have a dependency on
camel-quartz2
so tried feature:install camel-quartz2 and got...
org.apache.felix.resolver.reason.ReasonException : Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=camel-quartz2;
type=karaf.feature; version="[2.23.2.fuse-790040,2.23.2.fuse-790040]";
filter:="(&(osgi.identity=camel-quartz2)(type=karaf.feature)(version>=2.23.2.fuse-790040)(version<=2.23.2.fuse-790040))"
Now my fuse-karaf is 780038 not 790040 if that matters.
*Mike Oliver** Founder**, Open 4 Business Online*
Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
US Toll free: 1-800-985-4766 **NEW*
http://www.o4bo.com
Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
[image: Facebook]
<http://www.facebook.com/pages/Open-4-Business-Online/147285608707176> [image:
Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
<http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
<https://angel.co/open-4-business-online/> [image: Blogger]
<http://blog.open4businessonline.com/> [image: eBay]
<http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
<http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
Plus Page] <https://plus.google.com/113688478700619104336/posts>
Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com [image:
Skype] MikeOliverAZ
On Wed, May 19, 2021 at 12:44 PM Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Sending emails to google mail, via smtp is likely harder than trying
> to use the camel-google-mail component.
> If you need a test email server, then you can find smtp mail servers
> you can run as docker containers to use for testing purposes.
>
> On Wed, May 19, 2021 at 2:40 AM Mike Oliver
> <Mi...@open4businessonline.com> wrote:
> >
> > Trying to use Camel to send an email but getting the following error...
> >
> > javax.mail.MessagingException: Could not connect to SMTP host:
> > smtp.gmail.com, port: 465;
> > nested exception is:
> > javax.net.ssl.SSLHandshakeException: PKIX path building failed:
> > sun.security.provider.certpath.SunCertPathBuilderException: unable to
> > find valid certification path to requested target
> > at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
> > at
> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
> > at javax.mail.Service.connect(Service.java:366)
> > at
> org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:113)
> > at
> org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
> >
> >
> > The blueprint I am using is...
> >
> > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> > http://camel.apache.org/schema/blueprint
> > https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
> >
> > <camelContext id="_deadletterchannelcontext1"
> > xmlns="http://camel.apache.org/schema/blueprint">
> > <route id="_deadletterchannelroute1">
> > <from id="_from1" uri="direct-vm:deadletterchannel"/>
> > <log id="_log1" message="Dead Letter Channel body =
> > ${body}, headers = ${headers}"/>
> > <to id="_to1"
> > uri="smtps:
> smtp.gmail.com:465?password=blablabla&from=yaddayadda@gmail.com&subject=Error+in+ESB&to=MikeOliverAZ@open4businessonline.com&username=mikeoliveraz@gmail.com
> "/>
> > <log id="_log2" message="After SMTPS send...body =
> > ${body}, headers = ${headers}">
> > <description>See what comes out.</description>
> > </log>
> > </route>
> > </camelContext>
> > </blueprint>
> >
> >
> >
> >
> >
> > *Mike Oliver** Founder**, Open 4 Business Online*
> > Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
> > US Toll free: 1-800-985-4766 **NEW*
> > http://www.o4bo.com
> > Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
> > [image: Facebook]
> > <http://www.facebook.com/pages/Open-4-Business-Online/147285608707176>
> [image:
> > Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
> > <http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
> > <https://angel.co/open-4-business-online/> [image: Blogger]
> > <http://blog.open4businessonline.com/> [image: eBay]
> > <http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
> > <http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
> > Plus Page] <https://plus.google.com/113688478700619104336/posts>
> > Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com
> [image:
> > Skype] MikeOliverAZ
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
Re: SMTPS Throws Error
Posted by Mike Oliver <Mi...@open4businessonline.com>.
Thanks,
Actually I need to send to a gmail account. the Google Mail component is
likely the way to go, but requires dealing with OAuth so new territory.
Mike
Mike
*Mike Oliver** Founder**, Open 4 Business Online*
Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
US Toll free: 1-800-985-4766 **NEW*
http://www.o4bo.com
Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
[image: Facebook]
<http://www.facebook.com/pages/Open-4-Business-Online/147285608707176> [image:
Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
<http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
<https://angel.co/open-4-business-online/> [image: Blogger]
<http://blog.open4businessonline.com/> [image: eBay]
<http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
<http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
Plus Page] <https://plus.google.com/113688478700619104336/posts>
Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com [image:
Skype] MikeOliverAZ
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_2626753856223200806_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Wed, May 19, 2021 at 12:44 PM Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Sending emails to google mail, via smtp is likely harder than trying
> to use the camel-google-mail component.
> If you need a test email server, then you can find smtp mail servers
> you can run as docker containers to use for testing purposes.
>
> On Wed, May 19, 2021 at 2:40 AM Mike Oliver
> <Mi...@open4businessonline.com> wrote:
> >
> > Trying to use Camel to send an email but getting the following error...
> >
> > javax.mail.MessagingException: Could not connect to SMTP host:
> > smtp.gmail.com, port: 465;
> > nested exception is:
> > javax.net.ssl.SSLHandshakeException: PKIX path building failed:
> > sun.security.provider.certpath.SunCertPathBuilderException: unable to
> > find valid certification path to requested target
> > at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
> > at
> com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
> > at javax.mail.Service.connect(Service.java:366)
> > at
> org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:113)
> > at
> org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
> >
> >
> > The blueprint I am using is...
> >
> > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> > http://camel.apache.org/schema/blueprint
> > https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
> >
> > <camelContext id="_deadletterchannelcontext1"
> > xmlns="http://camel.apache.org/schema/blueprint">
> > <route id="_deadletterchannelroute1">
> > <from id="_from1" uri="direct-vm:deadletterchannel"/>
> > <log id="_log1" message="Dead Letter Channel body =
> > ${body}, headers = ${headers}"/>
> > <to id="_to1"
> > uri="smtps:
> smtp.gmail.com:465?password=blablabla&from=yaddayadda@gmail.com&subject=Error+in+ESB&to=MikeOliverAZ@open4businessonline.com&username=mikeoliveraz@gmail.com
> "/>
> > <log id="_log2" message="After SMTPS send...body =
> > ${body}, headers = ${headers}">
> > <description>See what comes out.</description>
> > </log>
> > </route>
> > </camelContext>
> > </blueprint>
> >
> >
> >
> >
> >
> > *Mike Oliver** Founder**, Open 4 Business Online*
> > Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
> > US Toll free: 1-800-985-4766 **NEW*
> > http://www.o4bo.com
> > Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
> > [image: Facebook]
> > <http://www.facebook.com/pages/Open-4-Business-Online/147285608707176>
> [image:
> > Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
> > <http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
> > <https://angel.co/open-4-business-online/> [image: Blogger]
> > <http://blog.open4businessonline.com/> [image: eBay]
> > <http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
> > <http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
> > Plus Page] <https://plus.google.com/113688478700619104336/posts>
> > Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com
> [image:
> > Skype] MikeOliverAZ
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_2626753856223200806_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Re: SMTPS Throws Error
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Sending emails to google mail, via smtp is likely harder than trying
to use the camel-google-mail component.
If you need a test email server, then you can find smtp mail servers
you can run as docker containers to use for testing purposes.
On Wed, May 19, 2021 at 2:40 AM Mike Oliver
<Mi...@open4businessonline.com> wrote:
>
> Trying to use Camel to send an email but getting the following error...
>
> javax.mail.MessagingException: Could not connect to SMTP host:
> smtp.gmail.com, port: 465;
> nested exception is:
> javax.net.ssl.SSLHandshakeException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
> at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2211)
> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
> at javax.mail.Service.connect(Service.java:366)
> at org.apache.camel.component.mail.DefaultJavaMailSender.send(DefaultJavaMailSender.java:113)
> at org.apache.camel.component.mail.MailProducer.process(MailProducer.java:63)
>
>
> The blueprint I am using is...
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint
> https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>
> <camelContext id="_deadletterchannelcontext1"
> xmlns="http://camel.apache.org/schema/blueprint">
> <route id="_deadletterchannelroute1">
> <from id="_from1" uri="direct-vm:deadletterchannel"/>
> <log id="_log1" message="Dead Letter Channel body =
> ${body}, headers = ${headers}"/>
> <to id="_to1"
> uri="smtps:smtp.gmail.com:465?password=blablabla&from=yaddayadda@gmail.com&subject=Error+in+ESB&to=MikeOliverAZ@open4businessonline.com&username=mikeoliveraz@gmail.com"/>
> <log id="_log2" message="After SMTPS send...body =
> ${body}, headers = ${headers}">
> <description>See what comes out.</description>
> </log>
> </route>
> </camelContext>
> </blueprint>
>
>
>
>
>
> *Mike Oliver** Founder**, Open 4 Business Online*
> Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
> US Toll free: 1-800-985-4766 **NEW*
> http://www.o4bo.com
> Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
> [image: Facebook]
> <http://www.facebook.com/pages/Open-4-Business-Online/147285608707176> [image:
> Twitter] <https://twitter.com/O4BO> [image: LinkedIn]
> <http://ph.linkedin.com/pub/mike-oliver/0/1b9/197> [image: AngelList]
> <https://angel.co/open-4-business-online/> [image: Blogger]
> <http://blog.open4businessonline.com/> [image: eBay]
> <http://www.store.o4bo.com/servlet/StoreFront> [image: YouTube]
> <http://www.youtube.com/channel/UCruaIEFosh9uvfkQCq7mtKw> [image: Google
> Plus Page] <https://plus.google.com/113688478700619104336/posts>
> Contact me: [image: Google Talk] mikeoliveraz@open4businessonline.com [image:
> Skype] MikeOliverAZ
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2