Hi,
I'm using cq5.5 and i have some problems about the MessageGatewayService.
import com.day.cq.mailer.MessageGatewayService;
@Reference
private MessageGatewayService messageGatewayService;
I'm not able to access this reference and the import doesn't exist.
Is the class changed? Did i leave something?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Please refer to the article mentioned below for more information (these article will give you step by step to setup message gateways with different use-cases ) :-
Link 1:- https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html
//
MessageGateway<Email> messageGateway;
//Set up the Email message
Email email =
new
SimpleEmail();
//Set the mail values
email.addTo(emailToRecipients);
email.addCc(emailCcRecipients);
email.setSubject(
"AEM Custom Step"
);
email.setMsg(
"This message is to inform you that the CQ content has been deleted"
);
//Inject a MessageGateway Service and send the message
messageGateway = messageGatewayService.getGateway(Email.
class
);
// Check the logs to see that messageGateway is not null
messageGateway.send((Email) email);
Link 2:- http://labs.6dglobal.com/blog/2012-08-20/sending-email-adobe-cq-api/
Link 3 :- https://helpx.adobe.com/aem-forms/6/aem-workflows-submit-process-form.html
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Make sure you have "Day CQ Mail Service"(/system/console/configMgr/com.day.cq.mailer.DefaultMailService) is configured correctly. When it's not, there is no Osgi service MessageGatewayService Thanks, Peter
Views
Replies
Total Likes
It is configured but i have an error by the correction tool of eclipse. I don't think there is a problem about the configuration of this service.
Views
Replies
Total Likes
Not sure why are you referring to your eclipse IDE..
The link posted earlier(/system/console/configMgr/com.day.cq.mailer.DefaultMailService) would open the actual OSGi service for you wit atual settings. This service has cancel, reset, delete, unbind and save buttons. Try to check values, then click unbind, then save.
Thanks,
Peter
Views
Replies
Total Likes
Hi Samuel,
Please look into this workflow article that indicates Message Gateway Service. I did so many times, it works. Also make sure you import both these
import
com.day.cq.mailer.MessageGateway;
import
com.day.cq.mailer.MessageGatewayService;
https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
Hi
Please refer to the article mentioned below for more information (these article will give you step by step to setup message gateways with different use-cases ) :-
Link 1:- https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html
//
MessageGateway<Email> messageGateway;
//Set up the Email message
Email email =
new
SimpleEmail();
//Set the mail values
email.addTo(emailToRecipients);
email.addCc(emailCcRecipients);
email.setSubject(
"AEM Custom Step"
);
email.setMsg(
"This message is to inform you that the CQ content has been deleted"
);
//Inject a MessageGateway Service and send the message
messageGateway = messageGatewayService.getGateway(Email.
class
);
// Check the logs to see that messageGateway is not null
messageGateway.send((Email) email);
Link 2:- http://labs.6dglobal.com/blog/2012-08-20/sending-email-adobe-cq-api/
Link 3 :- https://helpx.adobe.com/aem-forms/6/aem-workflows-submit-process-form.html
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
FYI - Since labs.6dglobal.com is down, here's the same article on Sending Email via the CQ API on my personal blog: https://www.danklco.com/posts/2012/08/20/sending-email-adobe-cq-api/