I have a requirement in Adobe CQ5. I have to create a form with some fields (say a registration form). Now after creating the form I have to mail the details to a particular email. things I need to know are.
- How to create custom email template?
- Now using the template to how do I create email with the data captured via form?
- How to configure the email settings?
Please provide you thoughts on this. Might be helpful to a lot of people.
Thanks in Advance.
You could use hidden fields on the form to send the body of the message with the rest of the fields. You can also do it with the CQ form components.
Here you could do 2 things, one is extending the mailServlet class that is on the src folder in foundation, this is the one that uses the foundation mail action, then you extend or create a custom action for use it with the CQ Form components, or you can implement a servlet with the MailService class.
the mail setting using the CQ mail service can be set on the Felix console on the configuration panel, search for the CQ5 Mail Service to set the smtp server, credentials and ports.