Send mail from API function Last updated: 09. Apr 2024
Follow this example to send email from your application.
SendEmail(filepath, template, sendTo, subject, messageText)
Use this function to generate and send output from a specific document by email.
This example will send a document by email to test@docly.net:
docly.SendEmail(filepath, "Receipt.html.pdf", "test@docly.net", "Subject here", "Message body here in text\nNew line\nThanks!");
For line breaks in text use \n
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", "test@docly.net");