Email Templates

Email Templates and System Email Templates are used to fill the subject and content of emails.

These can be used when:

  • writing emails
  • sending documents such as invoices or referral letters, via email. Here, the email template is linked to the relevant Document Template and it is normal to set these as System Email Templates so that they are not available to users on the email write screen

That is, System Email Templates are provided to differentiate between templates used for emailing standard documents (e.g. invoices), and the templates available in the Write Email Templates window.
Both Email Templates and System Email Templates may be used for the former, but only Email Templates may be used for the latter.

 

Templates can contain:

The following is a simple template for use when emailing a handout pdf that is not held in the OpenVPMS database - ie you use this template and then manually attached the Kidney function pdf to the email.

The following is a cover note used when emailing an invoice: (this template would be set as the 'Email Template' on the Invoice document template)

The following is used to generate a sexy looking footer block on emails:

See here for an explanation of the fields.

Documents

When the Content Type is Document the following document types are supported:

  • JasperReport (.jrxml), OpenOffice (.odt), Microsoft Word (.doc)
    • The object returned by the Content Source expression will be supplied to the document to support merging.
    • When selected by the email Template option, any parameters will be prompted for.

If the Content Source expression doesn't return a valid object, the document will be converted to HTML without merging.

  • Rich Text Format (.rtf)
    No merging is supported.
  • HTML (.html)
    No merging is supported.

Images

Images are supported, with the following caveats:

  • Images must be URLs, rather than embedded in documents.
    Popular email clients (e.g. GMail and Outlook) don't support embedded images.
  • OpenOffice should be used to merge OpenOffice/Word documents. 
    LibreOffice has a bug where all images are embedded in the HTML, and are therefore not displayable in all email clients.
  • Images may not be displayed automatically by email clients.
    According to this link referring to a study done in 2009, "only 48% of email recipients see images automatically".

See also How To: Email Template Tips - Open Office and How To: Email Template Tips - Jaspersoft Studio

Examples

The following shows the email generated by the invoice cover note template:

The following shows the footer generated by the third template:

Syndicate content