Copied to clipboard

Flag this post as spam?

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


  • bayshield 50 posts 65 karma points
    Nov 13, 2009 @ 11:49
    bayshield
    0

    Retrieve HTML via API

    HI,

    I would like to be able to send emails from a .Net user control based on templates stored in umbraco.  Ideally the user would be able to create multiple content items based on the email doc type specifing different email bodys.  One of the properties of the user control is the nodeid of the email to send.

    What I would like to know is how can I get the 'rendered' html via the api (using the node id) so I can then email it.

    Alternatively is there a better way to do it?  I want to give users the ability to modify the email body content.

    Thanks

    Aaron

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 13, 2009 @ 12:06
    Aaron Powell
    0

    You can do it via the RenderTemplate method, which is in umbraco.library if I recall correctly.

    Alternatively you could just do a web request to the URL which is generated for the node.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Nov 13, 2009 @ 14:38
    Nik Wahlberg
    0

    I would suggest the second appraoch as Slace suggests. This would allow you to have users create pages/nodes based on predefined template and then have them use the content picker to select the node that should be rendered in the email (effectively "scraping" the page for the content).

    -- Nik

  • mikkelstrack 26 posts 31 karma points
    Nov 13, 2009 @ 14:52
    mikkelstrack
    1

    You might want to check this package out. It makes you able to send mails directly from the document tree

    http://www.nibble.be/?p=63

Please Sign in or register to post replies

Write your reply to:

Draft