Expand my Community achievements bar.

Email from AEM via API's instead of SMTP Server

Avatar

Level 1

we have a requirement where the emails has to be sent via an API instead of an SMTP server from AEM. Is there a way to override Email service in AEM? Or how can we come over the SMTP connectivity.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Community Advisor

@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 ? 

Avatar

Level 1

@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.

Avatar

Community Advisor

@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..

Avatar

Level 1

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.

Avatar

Administrator

@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

Avatar

Level 1

are you still looking for a solution for this?