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 <mikeolive...@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=yaddaya...@gmail.com&subject=Error+in+ESB&to=mikeolive...@open4businessonline.com&username=mikeolive...@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] mikeolive...@open4businessonline.com [image: > Skype] MikeOliverAZ -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2