How to use CQ email service using Curl Command? | Community
Skip to main content
Himanshu_Singhal
Community Advisor
Community Advisor
July 19, 2016
Solved

How to use CQ email service using Curl Command?

  • July 19, 2016
  • 2 replies
  • 1081 views

Hi,

I need to send backup status using cq mail service (For backup, I'm using curl commands via shell scripts).

So, inside shell script, is there any way to use CQ mail service?

Thanks,

Himanshu

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 kautuk_sahni

Hi

I am not aware of direct way of doing so, but we can definitely do this.

Create a custom component/Service which will internally use CQ email service (invoked by AJAX). 

Now you can convert this AJAX call to CURL OR do POST call VIA CURL.

Link:-  http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request (Curl Get/Post call).

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-cq-email-services.html (helpx article for creating custom CQ Email Service)

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni

2 replies

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
July 19, 2016

Hi

I am not aware of direct way of doing so, but we can definitely do this.

Create a custom component/Service which will internally use CQ email service (invoked by AJAX). 

Now you can convert this AJAX call to CURL OR do POST call VIA CURL.

Link:-  http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request (Curl Get/Post call).

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-cq-email-services.html (helpx article for creating custom CQ Email Service)

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Jitendra_S_Toma
Level 10
July 19, 2016

As Kautuk suggested, There isn't a way to hit CQ mail service through a command. EMail services are not open. You need to register an OSGI service as servlet & make a http request to send an email.

kautuksahni wrote...

Hi

I am not aware of direct way of doing so, but we can definitely do this.

Create a custom component/Service which will internally use CQ email service (invoked by AJAX). 

Now you can convert this AJAX call to CURL OR do POST call VIA CURL.

Link:-  http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request (Curl Get/Post call).

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-cq-email-services.html (helpx article for creating custom CQ Email Service)

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni