using email template asp.net

  • Thread starter Thread starter gdc
  • Start date Start date
G

gdc

Hi,
I want to create a custamizable e-mail template which will contain place
holders to fill the data from teh database and i want to use these templates
to send mails.
How do i create these templates?.
How do i use the templaes to send mails in asp.net?
thanks
gdc
 
Okay, well, to send an email, you create a message (string), and send it.
The email template can therefore be a text file with tokens to replace in
it. A token is a character sequence which is recognized by your software.
For example, you could put [First Name] anywhere you want a certain First
Name to appear. Then you can use the String.Replace() method to replace all
occurrences of a given token with another string.

To use them, just open them and read them into a string. Then replace the
tokens, add the string as a message to an email, and send it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top