Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

OOTB Email service not working with R6 osgi annotations

Avatar

Level 3

Hi,

We have used OOTB Email service using R6 osgi annotations.

Currently facing one issue as message gateway service coming null while sending notification using gateway method.

How ever the message Gateway Service reference object is there but not working with Gateway method ?

Couple of other projects which implemented using Felix SCR annotations is working with email service.Do we have any reference implementations using R6 osgi?

1 Accepted Solution

Avatar

Correct answer by
Level 10

See this new HELPX Article that shows how to work with with MessageServiceGateway API in 6.4.

There is a video too that shows it all working. Follow this artilce -- 

https://helpx.adobe.com/experience-manager/using/message_service_gateway_api_64.html

View solution in original post

12 Replies

Avatar

Community Advisor

Hi,

Check your imports, you should be using osgi annotations to use services instead of Felix.

e.g.

import org.osgi.service.component.annotations.Component;

import org.osgi.service.component.annotations.Reference;



Arun Patidar

Avatar

Level 3

Hi Arun,

Used the Osgi annotations only R6 find the below screenshot

1577377_pastedImage_0.png

Avatar

Community Advisor

Could you provide a sample of your code for testing ?

Avatar

Level 3

Hi,

I have used the same steps as mentioned in git hub and tried below way for the delete content but still getting same gateway error and workflow aborted

Adobe Experience Manager Help | Creating custom AEM workflow steps that send email messages

I am using my Gmail as SMTP server.Do we have any issue if i use gmail ? How ever i am getting notification for Workflow abort other OOTB notifications?

Avatar

Community Advisor

Hi,

I am also using gmail for sending mails in above code.

Could be issue with email configuration, check below.

Configuring Email Notification

Screen Shot 2018-09-23 at 4.06.04 PM.png



Arun Patidar

Avatar

Level 3

SMTP configurations are correct and also i am able to get the OOTB notification for workflow abort/complete and also able to see the connection in SMTP debug mode but not picking the custom content as mentioned in bundle and also workflow aborted when the service is null? Do we have to do any other  osgi config? or what are the required pom dependencies ?

1577845_pastedImage_0.png

Avatar

Community Advisor

Hi,

Message gateway services are part of uber jar, so explicit dependencies are required.

I am ot sure what could be the issue but OOTB message service worked with osgi annotations.



Arun Patidar

Avatar

Level 10

Arun - we will update this article now for AEM 6.4 and show proper use of this API using DS Annotations.

Avatar

Community Advisor

Thanks Scott.



Arun Patidar

Avatar

Correct answer by
Level 10

See this new HELPX Article that shows how to work with with MessageServiceGateway API in 6.4.

There is a video too that shows it all working. Follow this artilce -- 

https://helpx.adobe.com/experience-manager/using/message_service_gateway_api_64.html

Avatar

Level 3

This Worked for me in AEM 6.3 also..Thanks !