Send mail from API function Last updated: 23. May 2023
Follow this example to send email from your application.
SendEmail(filepath, template, sendTo, subject, messageHtml)
Use this function to generate and send output from a specific document by email.
This example will send a document by email to firstname.lastname@example.org:
docly.SendEmail(filepath, "Receipt.html.pdf", "email@example.com", "Subject here", "Body here in html");
Important: Sending email is only possible from API functions.
SendForm(form, formName, [sendTo], [smtp])
Use this function to send a submitted form by email from an API function. Example sending a posted form from API function:
docly.SendForm(form, "Contact form", "firstname.lastname@example.org");