Hi,
How would I compose a string that will be rendered as html as has variables and field values mixed in. Here is a sample of what I'm trying to do...
I'm currently storing the string into a vfp edit box to see the output. Then I pass the value of the editbox to the ChilKat smpt control like this: loEmail.SetHtmlBody(Alltrim(.edtBody.Value))
The ChilKat example line is: loEmail.SetHtmlBody([<html><body><p>This is <b>bold text</b>, this is a <a href="])
The problem is it doesn'y factor in variables and field names within it...
This is my first attempt at writing html, and there is tons of help for that, but google yields little help mixing vfp values and html...
And I actually have Rick's book "Internet Applications with VFP6" and I don't see anything of help there.
Also, would using vfp's TEXT ... ENDTEXT Command be useful for this instead of concatenating several variables as I've done to get past the 256 char limit? And yes, I know the textbox is what has the 256 char limit, whereas the editbox does not, Its just as I started this using a textbox and all the multiple variables was already done...
Thanks,
Stanley
How would I compose a string that will be rendered as html as has variables and field values mixed in. Here is a sample of what I'm trying to do...
Code:
* b0 = [<html><body><p>Greetings ] + gcUserName + "," + Chr(13) + CHR(10) + Chr(13) + CHR(10)
b0 = "Greetings " + gcUserName + "," + Chr(13) + CHR(10) + Chr(13) + CHR(10)
b1 = "You are receiving this email because you have a user account in " + gcCountyName + " county." + Chr(13) + CHR(10) + Chr(13) + CHR(10)
b2 = "NEWS... We have finally gotten several ........ " + ;
"data accessible online by their customers..... " + ;
"to you to participate in an ........." + Chr(13) + CHR(10) + Chr(13) + CHR(10)
b3 = "Imaging Live, is a rooms, complete with ............" + ;
"full text, plat, source of page......., " + ;
"faxing, and OCR text services...................." + Chr(13) + CHR(10) + Chr(13) + CHR(10)
b4 = "Now, it's up To you, the cl............." + ;
"brief survey to help us convey to other............." + ;
" you will take part in........." + Chr(13) + CHR(10) + Chr(13) + CHR(10)
*b5 = "Thanks! You'll find the survey here..." + "[URL unfurl="true"]http://www.website.com"[/URL]
b5 = [<html><body><p>Thanks! You'll find the survey here... <a href="[URL unfurl="true"]http://www.wedsite.com">website.com</a></p></body></html>[/URL]]
.edtBody.Value = b0 + b1 + b2 + b3 + b4 + b5
I'm currently storing the string into a vfp edit box to see the output. Then I pass the value of the editbox to the ChilKat smpt control like this: loEmail.SetHtmlBody(Alltrim(.edtBody.Value))
The ChilKat example line is: loEmail.SetHtmlBody([<html><body><p>This is <b>bold text</b>, this is a <a href="])
The problem is it doesn'y factor in variables and field names within it...
This is my first attempt at writing html, and there is tons of help for that, but google yields little help mixing vfp values and html...
And I actually have Rick's book "Internet Applications with VFP6" and I don't see anything of help there.
Also, would using vfp's TEXT ... ENDTEXT Command be useful for this instead of concatenating several variables as I've done to get past the 256 char limit? And yes, I know the textbox is what has the 256 char limit, whereas the editbox does not, Its just as I started this using a textbox and all the multiple variables was already done...
Thanks,
Stanley