OOTB Email service not working with R6 osgi annotations | Community
Skip to main content
Level 3
September 22, 2018
Solved

OOTB Email service not working with R6 osgi annotations

  • September 22, 2018
  • 12 replies
  • 4633 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

12 replies

arunpatidar
Community Advisor
Community Advisor
September 22, 2018

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
Level 3
September 22, 2018

Hi Arun,

Used the Osgi annotations only R6 find the below screenshot

arunpatidar
Community Advisor
Community Advisor
September 22, 2018
VeenaVikraman
Community Advisor
Community Advisor
September 22, 2018

Could you provide a sample of your code for testing ?

Level 3
September 23, 2018

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?

arunpatidar
Community Advisor
Community Advisor
September 23, 2018

Hi,

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

Could be issue with email configuration, check below.

Configuring Email Notification

Arun Patidar
Level 3
September 23, 2018

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 ?

arunpatidar
Community Advisor
Community Advisor
September 24, 2018

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
smacdonald2008
Level 10
September 24, 2018

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

arunpatidar
Community Advisor
Community Advisor
September 25, 2018

Thanks Scott.

Arun Patidar