HTML email

Donate to this project

Development Project Status: Completed

Total cost estimate (ex-Tax): 
$3490
Due date for completion of this stage: 
14/03/2014
Release: 
1.9
Current Percentage Funded: 
100.00%
Project funding: 

You can donate money to this project by entering the amount above and clicking the 'Add to cart' button. In the Checkout process you can either choose to pay now (via Bank Transfer, Cheque or Pay Pal) or you can pledge the amount by choosing the 'Pledge a payment for a Development Project' method. If you make a pledge, then when we have 100% funding commitments, you will be notified by email and you can then action your payment. Note that development will not commence until all funds are received.

Project description: 

OpenVPMS currently supports plain-text email. This project will replace the plain-text email support with HTML, to provide rich-text emails.

It will support email templates, to enable rapid generation of standard emails. Email templates may be created in Word, OpenOffice or JasperReports. They will be converted to HTML.

User Interface Changes

Editing

The Mail editor will be changed to replace the plain-text editor with a rich-text editor. This provides support limited support for editing HTML. In particular it supports:

  • font style (normal, headings 1-6, preformatted, address)
  • font name
  • font size
  • bold
  • italic
  • underline
  • superscript
  • subscript
  • text alignment (left, centre, right, justify)
  • indenting
  • bullets
  • numbering

Limitations

The rich text editor has the following limitations:

  • It doesn't support editing images or links, but it can view them, when the mail is generated from a template.
  • It also provides a button to perform spell checking, but this requires additional development work, outside of the scope of this project.

Template Selection

A Template button will be added to the Mail editor that:

  • lists available email templates for selection
  • enables the user to filter templates based on name

When a template is selected, it will replace the subject and body of the current email.

If the Template button is pressed and there is existing content, a warning will be displayed:

Selecting an email template will replace existing content. Do you wish to proceed?

Macro Expansion

Macro expansion will be supported when editing HTML emails. The only restriction is that macros may only generate plain text.

Any html will be escaped.

Templates

A new document template type, entity.documentTemplateEmail will be created to hold email templates. This will have the following nodes:

  • name - the template name
  • subject - an optional email subject
  • contentType - identifies the type of the template content. One of:
    • TEXT
    • DOCUMENT
  • content - stores text content, used for migrating existing templates
  • expression - an optional xpath expression used to supply an object to the template. See http://www.openvpms.org/documentation/csh/1.7/admin/lookup/macroReport

For templates with contentType = DOCUMENT, the template content will be stored by an act.documentTemplate.

The existing entity.documentTemplate emailSubject and emailBody nodes will be removed. These will be replaced by a relationship to an entity.documentTemplateEmail.

By default, templates will be processed using JasperReports or OpenOffice, depending on the mime-type. If a template has a text/plain mime-type, it will be converted to html. This is to support migration of existing entity.documentTemplate.

Statements and Reminders

Currently statements and reminders are sent with the subject and body coming from the entity.documentTemplate emailSubject and emailText nodes respectively.

This will be changed to use the entity.documentTemplateEmail linked to the entity.documentTemplate. If a statement or reminder template doesn't have a linked entity.documentTemplateEmail, an exception will be thrown.

Migration

The existing entity.documentTemplate archetype has emailSubject and emailText nodes. These will be removed.

For each entity.documentTemplate that has content for these, the following will be created:

  • entity.documentTemplateEmail - the subject node will contain the emailSubject, the content node will contain the emailText, and the name will be copied from the entity.documentTemplate
  • an entityLink.documentTemplateEmail linking the entity.documentTemplate to entity.documentTemplateEmail

 

JIRA: OVPMS-1729

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: HTML email

Hi,

We would like to support this project. Could you send us an invoice?

Sam Snelling

Advanced Vetcare

 

Thanks,

Greta

Re: HTML email

I've done a preliminary costing and included a funding link above. The project may need updating when it gets some feedback.

-Tim

Re: HTML email

Great Tim,

We will fund the $3490. Well, when I say 'we', I mean Advanced Vetcare, not me personally ;)

Re: HTML email

Fantastic! Click on the funding link above and email your details through.

Thanks,

-Tim

Re: HTML email

Did this end up getting funding - I have started outlining my own patch, but I will stop if funding for TimA to develop this has been achieved.

If it has -the spec may be set and changes I propose may need to be moved

I would suggest that mail settings be moved to a seperate archetype and linked to location - allowing 1 mail set to be linked to multiple locations.  

I would suggest that archetype get an added html email signature field that can be optionally defined to attach the same sig to all emails sent out via OpenVpms.

 

Regards
 
Ben 
OpenVPMS Installer and Helper (Smalltime Developer) 
Ph: +61423044823 
Email: benjicharlton[at]gmail[dot]com

Re: HTML email

This project has received funding of 20%. If you would like to see this featured in the next version of OpenVPMS, why not donate a small amount to help see it come to fruition. We all benefit from these enhancements so please consider giving important ones like this a helping hand?

Re: HTML email

Hi All,

We would like to see this project progress to development asap and we are willing to contribute funds.  Can we have a show of hands for those who would be willing to share the remaining development costs for this project.

Cheers
Tony De Keizer

Re: HTML email

Hi,

We will put in 10%.

Can I ask if it would be possible for this project to be extended have a default document template for certain email types? I.e. it would be cool if when generating an email the templates could be selected based on what you are emailing.

I.e. Email patient history -> Patient History Email Template automatically selects.

I.e. Email Investigation -> Investigation History Email Template Automatically selects.

Seems like it would make http://www.openvpms.org/project/prefilled-emails-document-templates somewhat redundant in this case.

Thanks,

Adrian

Re: HTML email

Thanks for your contribution Adrian.

This project has now been funded to 30%.

Re: HTML email

Thanks to another generous donor who has contributed a further 5% of the funding to the HTML Project

Re: HTML email

Hi Tim,

Can I ask if this will include the ability to allow email templates linked to document templates or does this feature remain as a separate project?

Re: HTML email

Email templates will be linked to document templates for the benefit of statement and reminder generation. For general document templates (invoices, estimates etc), there is the Prefilled emails from document templates project. This project adds support for macro expansion of the email subject/body, which is not supported by the HTML email project.

Re: HTML email

This project has now been fully funded. Thanks to all of you who have donated to get this underway.

Syndicate content