2
In my string mensagem
, i would like to have a two line space, I tried using "/n" and I did not get the expected result.
@{
var customerName = Request["customerName"];
var customerEmail = Request["customerEmail"];
var customerRequest = Request["customerRequest"];
var customerSubject = Request["customerSubject"];
var atendimento = "[email protected]";
var errorMessage = string.Empty;
var debuggingFlag = false;
string mensagem = string.Format(customerRequest + "\n\n{0}", customerEmail);
try
{
// Initialize WebMail helper
WebMail.SmtpServer = "smtp.teste.com.br";
WebMail.SmtpPort = 25;
WebMail.UserName = "[email protected]";
WebMail.Password = "teste";
WebMail.From = "[email protected]";
// Send email
WebMail.Send(to: atendimento,
subject: customerSubject + " - " + customerName,
body: mensagem
);
}
catch (Exception ex)
{
errorMessage = ex.Message;
}
}
tries to use
\n\r
, your message istext/plain?
If it’s text/html you can use the tag<br/>
.– claudsan
@claudsan the Octeto used should be
\r\n
.– Omni