Hey everyone,
I'm working with a custom file where I'm loading a form from the backend using the Dynamicweb API. The form loads and submits data correctly, but I'm stuck on the email functionality.
The Problem
The code is a custom file and successfully fetches a form with ID 3 from the API endpoint /dwapi/forms/${formId}
to render the form and handle the form submission. That is why we can't use the backend or paragraph app settings for the form mailing.
However, I need to:
- Get an email template that's defined in Content > System Emails
- Send emails using the system's SMTP email when the form is submitted
What I Need Help With
- How do I properly reference a system email template from Content > System Emails?
- What's the correct way to send an email and using Dynamicweb's SMTP settings from code?
Any help would be greatly appreciated! I'm familiar with the form handling but not the email part of Dynamicweb.
Thanks in advance!