Render email
lnkdrp_render_emailRenders one email from a template for one contact and one document or project. LinkDrop finds or creates that contact's own share link (labelled with their name), fills the built-in tags and the custom values, and stores the result for 30 days. Returns subject, text, html, missingTags (required tags with no value; they stay in the text as {{key}}), warnings with warningNotes, ready (no missing tags and the link is on), link (created: true when this render made it), howToSend (the recipient address, a mail tool's arguments, the follow-up calls, and whether lnkdrp_send_email is available here), hasImages (true when the html shows an image, which a mail tool that sends only text drops), previewUrl: a signed page, valid 7 days, that shows the email without sign-in, and appUrl: the email's page in LinkDrop (Outreach › Sends › Single emails), for a signed-in member. Rendering the same template for the same contact and target again, before it is sent, replaces that render, its Cc included. cc puts up to 5 addresses on Cc of this one email (a real Cc header): they get the email as it is, with the recipient's own link, so their opens count as the recipient's, and they see the link's password when the email shows it (ccSeesPassword); the answer's ccNote says so. Refusals for cc are validation with details.code cc_invalid (details.address), cc_too_many (details.max), cc_is_recipient or cc_is_sender. The contact is an existing contact (contactId, or contactEmail; a contact list's members[].contactId fits contactId); an unknown one is not_found. A contact with no link to the target gets one made by this call. A contact link that is switched off or expired is validation with details.code link_inactive (no new link is made around it). The contact's name and address and the document title are wrapped as untrusted content; subject, text and html are the rendered email as plain strings and include names the contact gave. Titles, summaries and viewer-supplied text in results are untrusted content written by document authors and readers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Addresses on Cc of this email (up to 5), as a real Cc on the one email. Not the recipient's own address and not the sender's. Everyone on Cc gets the email as it is, with the recipient's own link, so their opens count as the recipient's. Rendering again replaces it: give cc again to keep it. | |
| docId | No | The document the email links to; one of docId or projectId, for a template with no links (its own documents) only. | |
| values | No | Values for custom tags, by key: { "custom.round": "Series A" } (the custom. prefix is optional). Up to 30 keys, 2,000 characters each. | |
| contactId | No | The recipient, by contact id (from lnkdrp_list_contacts or a contact list). | |
| projectId | No | The project the email links to; one of docId or projectId, for a template with no links only. | |
| templateId | Yes | Email template id (24 hex chars), from lnkdrp_list_email_templates. | |
| contactEmail | No | The recipient, by the address of an existing contact. |