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.
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).
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
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.
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
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
is working on a reply...