xml and email?

Discussion in 'ASP .Net' started by Leon, Nov 7, 2004.

  1. Leon

    Leon Guest

    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!
    Leon, Nov 7, 2004
    #1
    1. Advertising

  2. Leon

    Philipp Sumi Guest

    Leon,

    Beware: Shameless advertisment of my own solution:
    http://www.codeproject.com/csharp/mailtemplates.asp

    A little framework that takes care of your email templates. Hope it
    helps :)

    Philipp




    Leon wrote:

    > 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!
    >
    >
    Philipp Sumi, Nov 8, 2004
    #2
    1. Advertising

  3. Leon

    Leon Guest

    What about an example in vb.net?

    "Philipp Sumi" <> wrote in message
    news:...
    > Leon,
    >
    > Beware: Shameless advertisment of my own solution:
    > http://www.codeproject.com/csharp/mailtemplates.asp
    >
    > A little framework that takes care of your email templates. Hope it helps
    > :)
    >
    > Philipp
    >
    >
    >
    >
    > Leon wrote:
    >
    >> 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!
    Leon, Nov 8, 2004
    #3
  4. Leon

    Philipp Sumi Guest

    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, "")


    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
    Philipp Sumi, Nov 8, 2004
    #4
  5. Leon

    Leon Guest

    "lol" You are right thanks!
    "Philipp Sumi" <> wrote in message
    news:...
    > 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, "")
    >
    >
    > 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
    >
    >
    Leon, Nov 8, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    1,105
    Mike Meyer
    Jun 22, 2005
  2. Replies:
    5
    Views:
    112
  3. Erik Wasser
    Replies:
    5
    Views:
    445
    Peter J. Holzer
    Mar 5, 2006
  4. ecureuil
    Replies:
    0
    Views:
    320
    ecureuil
    May 28, 2006
  5. Replies:
    13
    Views:
    459
    Randy Webb
    May 14, 2006
Loading...

Share This Page