Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to use CQ email service using Curl Command?

Avatar

Community Advisor

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

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

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

Avatar

Level 9

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