In this form I have text inputs and an email field. The intention is to send the results of these fields to the email written in the form when you press the send button.
Views
Replies
Total Likes
Hi @Vodjakxa
Create a servlet to handle the form data processing. The servlet will:
This approach is explained in detail in this blog, which provides guidance on sending emails upon form submission.
https://medium.com/@toimrank/aem-email-custom-template-style-and-attachment-d4c0a196ec98
Regards
Ayush
Thanks for the reply.
I was looking for a simpler and more immediate method, without having to create new dependencies, but possibly a function already integrated with AEM.
Views
Replies
Total Likes
To send an email via a form in AEM:
1. Create a Servlet to handle the form submission and send the email:
- Capture form data (like email, subject, message).
- Use Day CQ Mail Service to send the email. Form HTML (example):
2.Form HTML (example):
<form action="/bin/send-email" method="post">
<input type="email" name="email" placeholder="Recipient Email" required />
<input type="text" name="subject" placeholder="Subject" required />
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>
3. Configure SMTP settings in AEM for email sending.
4. Test the form submission
Views
Replies
Total Likes