EMail HTML Formatting

 

Example for Pre-295 SP5.

 

Here is an example of how to construct a notification email in HTML format in SO10.  This uses variable substitution to put dynamic values into the text and also provides a hyperlink so that the recipient can process the form directly:

 

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
      Please approve a timesheet:

      ===========================

                                                                             

      Form Type: &FTYPE&

      Form Name: &FORMNAME&

      Form ID:   &ID&

      Employee   &H_FULL_NAME&

                                                                             

      <html>

      <body>

                                                                             

      <a href="&URL&">Click here to access form</a>

      </body>

      </html>

If your email system does not support HTML, you must remove all of the HTML tags and revert to plain text only.


Snippet method for 295 SP5 onward.

Longer email titles

At previous FLM versions, emails sent by FLM could have a title of up to 50 characters. At 295sp5 this was increased to 132 characters. Please note however that this applies to the actual emails being sent, not to the emails being viewed via transaction sost. The following emails are affected:

  • Notifications
  • Reminders
  • Emails with offline forms attached
  • Emails for decision capture
  • Emails sent after submitted offline forms fail validation
  • Emails sent after a failed posting
  • Emails sent by function module /FLM/EMAIL_PDF

Email bodies via Snippets

The ability to inject javascript snippets into email bodies has been introduced.

In order to use this new functionality, customers must first allocate the snippet to the form type and status by using the ‘Allocate Javascript Function Libraries  to Forms’ IMG transaction. They can then use any allocated snippet in the email by inserting &<SNIPPET_NUMBER>& into the standard text object.

  • Create a Snippet in SPRO ... Forms Lifecycle Manager -> Forms Optimization -> JavaScript Management
  • Assign Snippet to a Form Type in Allocate Javascript Function Libraries to Forms
  • add &1107& to the SO10 text used for Email bodies.

The snippets may contain references to any of the usual variables (or urls) that are substituted in the standard text in the normal way, ie by using &<VARIABLE_NAME>&. Customers may also write text as normal in their standard text object and the code has been updated  so that the ‘format’ column in the S010 editor is better respected. The SO10 formats are ‘translated’ in the following way:

SO10 format

HTML added to email

*

A <p> (paragraph) tag is added

B

A <p align="justify"> tag is added

C

A <p align="center"> tag is added

L

A <p align="left"> tag is added

/

A <br> (new line)  tag is added

/=

A <br> (new line)  tag is added

/(

A <br> (new line)  tag is added

/:

Lines with this format are ignored

/*

Lines with this format are ignored

Other/no format

Text in this line is concatenated to the text of of the previous line

 

If paragraph tags are added, these will close when the next paragraph starts, or when the text ends. For this reason, extra care must be taken when both the format column and actual html (whether it is produced by snippet injection or not) are used and it is recommended that such use is avoided. The standard text in the following image for example will produce an eror and a blank email as the * format will produce a <p> tag that will close at the end of the text, ie after </div></body></html>.  

The above changes will affect the following emails:

  • Notifications
  • Reminders
  • Emails with offline forms attached (if the email type is set to html in the email user-exit)
  • Emails for decision capture (if the email type is set to html in the email user-exit)
  • Emails sent after submitted offline forms fail validation
  • Emails sent after a failed posting
  • Emails sent by function module /FLM/EMAIL_PDF