can we send an email from Cloud AEM servlet?

Avatar

Avatar
Affirm 5
Level 4
TB3dock
Level 4

Likes

37 likes

Total Posts

223 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Ignite 10
Boost 25
Give Back 25
Validate 10
View profile

Avatar
Affirm 5
Level 4
TB3dock
Level 4

Likes

37 likes

Total Posts

223 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Ignite 10
Boost 25
Give Back 25
Validate 10
View profile
TB3dock
Level 4

12-07-2021

We want to implement a simple survey for users on our AEM site (cloud version).  To submit this, we need to write a servlet which takes the params (rating, comment, username etc) and sends them as email for someone in our organisation to manually collate and report on.

Is there some sort of built in SMTP service, or do we need to integrate via standard JAVA API to something like mailchimp or silverpop?

We have also considered integrating with something like jira or airtable to send and collate data, but we will use email as a backup if this is not feasible.

This will not be used to send emails to users, thats done via ACM.  This is to send emails to our staff.

Ideally we don't want to use any sort of templates, as this adds complexity and dev time.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

644 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

644 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

12-07-2021

@TB3doc, a Sling Servlet in AEM will satisfy all your requirements. Take this example below where it is an example of a servlet sending out an email from an AEM instance.

https://www.albinsblog.com/2014/12/sending-mail-through-java-api-with_17.html#.YOyOmhNKhQI

 

However, if you are working on a large-scale website, then I would recommend a micro-services architecture. With the micro-services architecture, this will not overtake AEM publisher resources, resulting in a more performant environment for serving content from AEM. With this strategy, you would only need to work on the AEM front-end, while the micro-services will take care of all the : silverpop api, air table, or any other third party API calls.

 

The micro-services architecture, enables scalability (verticle scaling), security, reliability, high performance, etc... You will also be able to re-use this endpoint for multiple devices and channels such as IOS/Android apps, Kiosks, desktop apps, etc...

example:

BrianKasingli_0-1626116876113.png

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,431 likes

Total Posts

3,305 posts

Correct reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,431 likes

Total Posts

3,305 posts

Correct reply

937 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

13-07-2021