locked
SCSM2010 Emial templates RRS feed

  • Question

  • Hi there

    I have the following problem with templates of email notifications: if I populate field with "Enters" (for example, Description) into template and check HTML flag then I get a letter without any "Enters" in body.

    What can be the reason of this behaviour?

    Any help will be greatly appreciated.

    Regards,

    kpa

    Wednesday, February 15, 2012 7:38 AM

Answers

  • Hi,

    You can use the style attribute in the pre tag to specify which font style that should be used.

    Example:

    <pre style="font-family: verdana; font-size: medium; font-weight: bold; font-style: italic;">
    Inner text goes here... </pre>


    Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se

    • Marked as answer by kpaRU Sunday, February 19, 2012 5:14 PM
    Sunday, February 19, 2012 5:09 PM

All replies

  • the <br/> html tag acts a new line

    the "enter" key will not work.

    try adding <br/>


    As long as you learn something new every day, the day is not wasted.

    • Proposed as answer by Patrik Sundqvist Sunday, February 19, 2012 9:40 AM
    • Unproposed as answer by kpaRU Sunday, February 19, 2012 4:36 PM
    Wednesday, February 15, 2012 12:55 PM
  • Thank you for the reply

    In my opinion adding tags to description is not suitable because this field is filled by users.

    Wednesday, February 15, 2012 1:07 PM
  • Is it fixed in next release or next CU? or Is it a normal behaviour for HTML templates?
    Thursday, February 16, 2012 4:39 AM
  • Hi,

    As Fletcher Kelly is saying, since you're activly choosing to use HTML encoding you need to follow the HTML standard. To produce a line break in HTML you need to use "<br/>".

    http://www.w3schools.com/tags/tag_br.asp


    Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se

    Sunday, February 19, 2012 9:40 AM
  • Hi

    "<br/>" tag is good for separating different field in email but is not good for separating different inner lines in one field such as description. 

    Sunday, February 19, 2012 9:48 AM
  • Hi,

    I see what you're saying. Maybe using the "<p>" paragraph is more suitible in your case?
    http://www.w3schools.com/tags/tag_p.asp

    Hope that helps :)


    Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se

    Sunday, February 19, 2012 9:53 AM
  • In both cases I have to put tags in field's value which is visible on the form. It's not desirable for HelpDesk and upper level support to see system chars at user's fields.
    Sunday, February 19, 2012 10:03 AM
  • Hi,

    Now I see what your problem is. Sorry for moving a bit to fast here.

    So as you stated you want to have your template in HTML, but your injected text (like Description from an Incident) doesn't maintain the formatting.

    Did you try to wrap the fileds in <pre> tags in the HTML template?  

    http://www.w3schools.com/tags/tag_pre.asp
    Text in a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.


    Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se

    Sunday, February 19, 2012 10:10 AM
  • Hi,

    Thank you for suggestion,

    I'll try it ASAP and return here with results.

    Sunday, February 19, 2012 10:22 AM
  • Hi,

    this works but "<pre>" tag changes the style for inner text so you recieve a letter with differently formatted parts of the body.

    Is there another posibility to cover the requirements of our customer?

    Sunday, February 19, 2012 4:35 PM
  • Hi,

    You can use the style attribute in the pre tag to specify which font style that should be used.

    Example:

    <pre style="font-family: verdana; font-size: medium; font-weight: bold; font-style: italic;">
    Inner text goes here... </pre>


    Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se

    • Marked as answer by kpaRU Sunday, February 19, 2012 5:14 PM
    Sunday, February 19, 2012 5:09 PM