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>mikeolive...@open4businessonline.com</constant>
            </setHeader>
            <log id="_log1" message="Dead Letter Channel body = ${body},
headers = ${headers}"/>
            <to id="_to1"
uri="google-mail:MESSAGES/send?accessToken=&quot;ya29.a0AfH6SMCrxMWrMRFjROZlNJdr01dBukZOSprV8auAv0SdvCqxCyNfP5Bn04V1hKr4thiA1dZanMtSERd1BlAG7j8YCcb3SG_S1uwJwOGb5aMcAND8_QFKZHUbSYWrVRS7UMhSlIYbykjqWoys2XbX1f-0kEiL&quot;&amp;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] mikeolive...@open4businessonline.com [image:
Skype] MikeOliverAZ



On Wed, May 19, 2021 at 12:44 PM Claus Ibsen <claus.ib...@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
> <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&amp;from=yaddaya...@gmail.com&amp;subject=Error+in+ESB&amp;to=mikeolive...@open4businessonline.com&amp;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
>

Reply via email to