html email body with richtextbox?

MiltonSnider

Member
Joined
Sep 15, 2009
Messages
7
Programming Experience
Beginner
I have a Visual Basic console application which sends emails using threading since the number of recipients is more than 1000. I am using a richtextbox for the message body. The text does not translate into HTML, meaning no line breaks or formating. I have 50 or more web based apps but this console programming is totally new to me. Should I be using a richtextbox? How can I accomplish this?
regards
Milton
 
richtextbox and console app

OK, forget the richtextbox. Since I know the subject and body I am pulling the body from an html file. I can do this ok except for one problem. In the body of the html file I have the characters UNIQUECODE . I would like to replace this text with a string from a field in a DB. I read in the html file and assign the html string variable to be the file text. When I now try html.Replace("UNIQUECODE", rd("passcode").tostring) nothing happends. No errors, but no replacement. Why won't the replace function work? I am sure the rd("passcode") is ok.
regards
Milton
 
String.Replace is a function, not a sub. String objects are immutable so, just like all string manipulation methods, String.Replace does not affect the instance it's called on. It returns a new instance with the specified replacement(s) made. If you no longer want the original then you must assign the result of the function to the same variable, e.g.
VB.NET:
str = str.Replace("x", "y")
 
Back
Top