Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Søren Reinke 156 posts 184 karma points c-trib
    Jun 28, 2011 @ 13:21
    Søren Reinke

    XSLT to generate plain text email

    Hi there

    Has any of you a XSLT file for generating pure plain text emails when a form is submitted in Contour ?

    I just need the field to be outputtet as:


    Company Name Name

    Company Address Road 117


    and so forth.


    I tried to make my own XSLT, but it looks like the formatting is still html, and therefore the linefeeds are not being shown.

    I used this XSLT


    <xsl:stylesheet xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="urn:my-scripts" xmlns:umbraco.library="urn:umbraco.library" version="1.0" exclude-result-prefixes="xsl msxsl user umbraco.library">
        <xsl:output method="text" encoding="utf-8" media-type="text/plain"/>
        <xsl:param name="records"/>
        <xsl:template match="/">
            <xsl:for-each select="$records//fields/child::*">
                <xsl:value-of select="./caption"/>
                <xsl:value-of select=".//value"/>

    I get this output, when view source in outlook:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">Field1   1234
    Field2 345


    Hope you can help.


  • Tom Fulton 2028 posts 4593 karma points c-trib
    Jun 28, 2011 @ 14:06
    Tom Fulton


    I believe the built in "Send email" workflow hardcodes the MailMessage to use HTML.  If you want to use plain text, you might need to create a custom workflow


  • Søren Reinke 156 posts 184 karma points c-trib
    Jun 28, 2011 @ 14:14
    Søren Reinke

    Hi Tom

    I was afraid of that.

    Hopefully they will fix that (in my oppinion) design error in a later version. 

Please Sign in or register to post replies

Write your reply to:

Draft is the community mothership for Umbraco, the open source cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco version 7.3.1