J
JP SIngh
Hi All
Hope someone can help us with an issue here.
We use an ASP application in which we send out emails using cdo for various
events.
At present the email text is hard coded into the code. for example
strMessage = "Dear " & rs("firstname")
strMessage = strMessage & "Your request has been approved with reference id
" & rs("id")
This causes an administration overhead as everytime the text of the message
needs to be changed we need to alter the code to incorporate text or
database values.
What we want is to store the message text into a table so it can be altered
by the application administrators through GUI by adding the text through
freetext entry and field names though a dropdown.
and then use something like
strFirstName = rs("firstname")
Set rst = Server.CreateObject("ADODB.Recordset")
sql = "select * from templates where id = 1"
rst.Open sql, conn
strText = rst("templatedata")
Response.write "templatedate " & strText
Now is the strText Contains the text Dear {FirstName} This is a contract
between the two parties.
How do I change all occurances of the {FirstName} with strFirstName such
that if firstname is "SIMON" the strText should be
"Dear SIMON This is a contract between the two parties."
Any help is appreciated.
Hope someone can help us with an issue here.
We use an ASP application in which we send out emails using cdo for various
events.
At present the email text is hard coded into the code. for example
strMessage = "Dear " & rs("firstname")
strMessage = strMessage & "Your request has been approved with reference id
" & rs("id")
This causes an administration overhead as everytime the text of the message
needs to be changed we need to alter the code to incorporate text or
database values.
What we want is to store the message text into a table so it can be altered
by the application administrators through GUI by adding the text through
freetext entry and field names though a dropdown.
and then use something like
strFirstName = rs("firstname")
Set rst = Server.CreateObject("ADODB.Recordset")
sql = "select * from templates where id = 1"
rst.Open sql, conn
strText = rst("templatedata")
Response.write "templatedate " & strText
Now is the strText Contains the text Dear {FirstName} This is a contract
between the two parties.
How do I change all occurances of the {FirstName} with strFirstName such
that if firstname is "SIMON" the strText should be
"Dear SIMON This is a contract between the two parties."
Any help is appreciated.