0
I wonder if I can leave the recipient’s email on web.config, if I can, how to deploy. I created a variable and gave the value of the email, but if I need to change I will have to compile dnv, if I can put the recipient on the web.config and only get the value from there will not need to compile every time the email is changed. Thank you
public void montarEmail(string nome, string email, string celular, string telefone, string assunto, string mensagem)
{
var servicoDeEmail = new ServicoDeEmail();
var destinatario = "[email protected]";
string corpoDoEmail = "Dados do contato: <br />" +
"<br />" +
"<b>Nome: </b>" + nome + "<br />" +
"<b>Email: </b>" + email + "<br />" +
"<b>Telefone: </b>" + telefone + "<br />" +
"<b>Celular: </b>" + celular + "<br />" +
"<br />" +
"<b>Mensagem: </b>" + mensagem;
servicoDeEmail.EnviarEmail(destinatario, assunto, corpoDoEmail);
}
It worked vlw!!! var servicoDeEmail = new Servicodeemail(); var destinatario = Configurationmanager.Appsettings["Emaildestinatario"]; var cc = Configurationmanager.Appsettings["Emailcc"];
– Carlos Roberto
@Carlosroberto Good! Mark the answer as correct to help other people who have the same question.
– Paulo R. F. Amorim