Copied to clipboard

Flag this post as spam?

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


  • Mukesh 15 posts 35 karma points
    Sep 13, 2012 @ 12:45
    Mukesh
    0

    Sending mail with customized Submitted data from Contour Form

    I have a form with few field like (Name, Type of Organisation, Summary ).

    Now I want to send all the data with proper format on e-mail when User click on submit batton after filling all details.

    I am new in umbraco, So Please provide me solution with details.

    Thanks in advance.

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 13, 2012 @ 13:06
    Fuji Kusaka
    0

    Hi Mukesh,

    Welcome to Umbraco. What you could do is make use  of the "Send xslt transforme email" in the workflow of your created Form.  

    This is available in the Workflows under Type and upload XSLT file where you can customized your fonts and all the records you want the user to received.

    Here is an example of your xslt

    <xsl:output method="html" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"  doctype-system="DTD/xhtml1-strict.dtd"  cdata-section-elements="script style"  indent="yes"  encoding="utf-8"/>
    <xsl:param name="records"/>
    <xsl:template match="/">
    <p style="font:normal 14px/22px Arial, Helvetica, sans-serif;  color:#333;">  
     <xsl:value-of select="$records//fields/child::* [caption = 'Email']//value"/> // You can make use of $records if you want to retrieve some data from the submitted form

      // Or Just some plain text !!
     </p>
    </xsl:template>

    hope this will help you 

    //Fuji 

  • Mukesh 15 posts 35 karma points
    Sep 13, 2012 @ 14:39
    Mukesh
    0

    Contour's standard "Send email" works great, but this seems to simply do nothing.

     I'm wondering if there's some manual step I'm unaware of?

    Even sample file also doiing nothing. I am geting thank you message just not the email.

    Create form > create on submit workflow > type: Send xslt transformed Email > addess, subject, select local file (lets say the sample file) > Add.

  • Mukesh 15 posts 35 karma points
    Sep 13, 2012 @ 14:58
    Mukesh
    0

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:user="urn:my-scripts"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="xsl msxsl user umbraco.library">
     
      <xsl:output method="html" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      doctype-system="DTD/xhtml1-strict.dtd"
      cdata-section-elements="script style"
      indent="yes"
      encoding="utf-8"/>
     
      <xsl:param name="records"/>

    <xsl:template match="/">
    <p>  
      Dear  <xsl:value-of select="$records//fields/child::* [caption = 'Type of Organisation']//value"/>&#160;
            <xsl:value-of select="$records//fields/child::* [caption = 'Email']//value"/>&#160;
            <xsl:value-of select="$records//fields/child::* [caption = 'Summary']//value"/>, thank you for your application.........
      </p>  
    </xsl:template>
     
    </xsl:stylesheet>

  • Niels Lynggaard 190 posts 548 karma points
    Sep 13, 2012 @ 15:07
    Niels Lynggaard
    0

    A quick guess; did you setup your mailsettings in web.config? - you need to point your umbraco towards a mailing server it can use to send emails, and possibly provide your credentials if needed.

    Find this in the web.config and insert your email server there:

    <system.net>
        <mailSettings>
          <smtp>
            <network host="127.0.0.1" userName="username" password="password" />
          </smtp>
        </mailSettings>
      </system.net>

  • Mukesh 15 posts 35 karma points
    Sep 13, 2012 @ 15:11
    Mukesh
    0

    Yes. 

    Contour's standard "Send email" works great,

    But Send xslt transformed email seems to simply do nothing.

  • Scott 95 posts 277 karma points
    Nov 21, 2012 @ 22:48
    Scott
    0

    Hi,

    I see that you have not marked this as resolved.

    The thing is that you have to address the "seems to simply do nothing" thing as an error in the format of the stylesheet.

    Try out something simple to begin with and then later on make it more complex to see when and where the error occurs.

    Here is a simple one you can try out, when you got that one working develop it further:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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="html" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="utf-8"/>
    <xsl:param name="records"/>
    <xsl:template match="/">
    <xsl:copy-of select="$records" />
    </xsl:template>
    </xsl:stylesheet>

    I have tested it on my own solution and it works fine.

    Scott

  • Fabio Milheiro 74 posts 136 karma points
    Feb 14, 2013 @ 17:25
    Fabio Milheiro
    0

    Mukesh,

    Same problem here. Did you manage to make it work?

    Mine works if I specify an e-mail as a constant. If I specify a placeholder {email} it doesn't work, although {email} works for the simple version of the send email workflow item.

     

    Thanks,

    Fabio

  • Comment author was deleted

    Feb 14, 2013 @ 17:28

    @Fabio that's strange there shouldn't be a difference ... and this is tested on the same form?

  • Fabio Milheiro 74 posts 136 karma points
    Feb 14, 2013 @ 18:10
    Fabio Milheiro
    0

    Hi @Tim,

    Yes, it was the same form but it was erroing in the xslt.

    I added &nbsp; and assumed the xslt was right which it wasn't.

    Thanks!

  • Comment author was deleted

    Feb 14, 2013 @ 18:50

    Ok that would have been my guess :) glad it's solved

Please Sign in or register to post replies

Write your reply to:

Draft