I send an email to the user who signs in to the application. I'd like to know how to do the line break so that it stays the way I want it to. Here is the code I use:
private void newUserEmail(string email, string sexo, string usuario)
{
String strResult, strURL;
string conteudo;
strURL = "http://app.com.br/email_template/padrao.html";
WebResponse objResponse;
WebRequest objRequest = HttpWebRequest.Create(strURL);
objResponse = objRequest.GetResponse();
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
strResult = sr.ReadToEnd();
sr.Close();
}
string subject = null;
if (sexo.Equals("F"))
{
subject = "Bem Vinda!";
conteudo = "<b>Bem Vinda!! "+usuario+ "</b>";/*string.Format(" /*string.Format("<b>Bem Vindo, " + usuario + "!<b>{0}" +
"<b>Linha 2:{1}" +
"1. Linha 3.{2}" +
"2. Linha 4.{3}" +
"3. Linha 5.{4}", Environment.NewLine);*/
}
else
{
subject = "Bem Vindo!";
conteudo = "<b>Bem Vindo! " + usuario+ "</b>";/*string.Format("<b>Bem Vinda, " + usuario + "!<b>{0}" +
"<b>Linha 2:{1}" +
"1. Linha 3.{2}" +
"2. Linha 4.{3}" +
"3. Linha 5.{4}", Environment.NewLine);*/
}
string html = strResult;
string body = html.Replace("{{{CONTEUDO}}}", conteudo);
SendEmail.SendMessage(email, body, subject);
}
The commented lines were what they had tried to do, but to no avail. Thank you.