xml and email?

L

Leon

How do I stored a pre-built html email message in a xml file instead of hard
coding in my code-behind page?

If you know any articles or books that explain the above please include them
in your response.

Thanks!
 
P

Philipp Sumi

Leon,
What about an example in vb.net?

I'm a C# programmer, you ask a lot if you expect me to do the same work
twice ;-)

To get and send a template, you're done with 3 lines of code...

'get the controller
Dim handler As TemplateHandler = TemplateHandler.Instance
'get a french template
Dim template As MailTemplate = handler("registration",
New CultureInfo ("fr"))
'send the template to a single recipient
handler.Send(template, "(e-mail address removed)")


In case you don't understand parts of the code, just copy and paste it
into a converter:
www.developerfusion.com/utilities/convertcsharptovb.aspx

Cheers,
Philipp
 
L

Leon

"lol" You are right thanks!
Philipp Sumi said:
Leon,


I'm a C# programmer, you ask a lot if you expect me to do the same work
twice ;-)

To get and send a template, you're done with 3 lines of code...

'get the controller
Dim handler As TemplateHandler = TemplateHandler.Instance
'get a french template
Dim template As MailTemplate = handler("registration",
New CultureInfo ("fr"))
'send the template to a single recipient
handler.Send(template, "(e-mail address removed)")


In case you don't understand parts of the code, just copy and paste it
into a converter:
www.developerfusion.com/utilities/convertcsharptovb.aspx

Cheers,
Philipp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top