Email from AEM via API's instead of SMTP Server | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
March 20, 2024

@sahilwa2 you can use the https://adobe-consulting-services.github.io/acs-aem-commons/features/e-mail/email-api/index.html email API, but again it internally use the SMTP configured in Day CQ Mail Service. 

When you say you want to use API to send email, which API are you talking about ? 

sahilwa2Author
March 21, 2024

@saravanan_dharmaraj - By API I mean I cannot connect AEM with company SMTP server. We have some exposed services which we need to use to send emails those are over HTTPS protocol.

Hence the end requirement is that all emails going out of AEM should be on HTTPS instead of SMTP i.e. we need change in default behavior of AEM and override it to use HTTPS Services for email delivery.

Shashi_Mulugu
Community Advisor
Community Advisor
March 21, 2024

@sahilwa2 given the client requirement to use https service instead of SMTP , there's no OOTB way to take this fwd... we need to write a custom service with custom email templates with custom configuration..

 

You need to get more precise requirements now as we are not using OOTB way, all default evenr notifications will not triggered,  so work with client on what all events they would like receive emails, if it part of any workshops, create a process step and call your custom osgi email service, if not workflow process, write custom event handlers and call custom osgi email service..

sahilwa2Author
April 29, 2024

The blocker is that SMTP server is not Public Hosted and the only way to connect is GraphQL API's. So we need a solution to send email's via this GraphQL API's. So we don't want to override each feature for AEM instead thinking of somehow updating the default Email Service to send request to these API's so that one change can hold the complete AEM requests.

kautuk_sahni
Community Manager
Community Manager
May 20, 2024

@sahilwa2 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
sahilwa2Author
June 20, 2024

@kautuk_sahni - I am still looking for a solution around this.

Level 2
November 18, 2024

are you still looking for a solution for this?