With the Webvanta system, JavaScript on your web pages can trigger the generation of email. Email generation can also be set to run once a day (such as for daily updates).
(Note: the email generation feature is available only on certain plans.)
To send an email, call the email generation JavaScript API by posting to the email endpoint. The endpoint is:
/admin/api/v2/email/<webvanta api key>/send
The Webvanta API key is custom to each site. Contact support to get your key.
Here's an example of an email generation:
$.post("/admin/api/v2/email/2ccfecc0e8ed6ec70997cad406c60c0984d1e861/send",
{
pid: 1440169,
subject: "Your document is attached",
from: "me@mysite.com",
path: "/document-email",
item: 1234567,
attachments: [{filename: myfile.pdf, file_path: /documents, content_type: "application/pdf"}]
},
The Webvanta email system is intended only for transactional emails. You can send emails only to specific people identified by their PID (profile id).
The parameters are:
The post to the endpoint will return a standard Job Status ID for tracking progress. The value will be either "ok" or an error message.
Email pages can use the optional {{item}} replacement syntax for ItemPages as for PDFs