3
I don’t want those items sent in the real estate email.
string emailOrigem = imobiliaria.Email;
string password = imobiliaria.Senha;
string html = getBody(dados); //aqui serve pra formata o html
if (!string.IsNullOrEmpty(html))
{
MailMessage msg = new MailMessage();
msg.Subject = dados.Assunto;
msg.From = new MailAddress(emailOrigem);
msg.IsBodyHtml = true;
msg.Body = html;
if (dados.Modelo.Contains("indicar"))
{
EmailTemplate plate = (EmailTemplate)dados;
bool temEmail = !string.IsNullOrEmpty((dados as EmailTemplate).EmailIndicado);
if (temEmail)
{
msg.To.Add(plate.EmailIndicado);
}
}
else
{
msg.To.Add(new MailAddress(Email da imobiliaria aq));
}
SmtpClient smtp = new SmtpClient();
//smtp.Host = "smtp.gmail.com";
smtp.Host = "smtp-mail.outlook.com";
smtp.Port = 587;
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
NetworkCredential nc = new NetworkCredential(emailOrigem, password);
smtp.Credentials = nc;
smtp.Send(msg);
You have no control over it. You may even have some Google API that allows you to manipulate the boxes, but it’s another technology.
– Maniero
So you’re gonna show up anyway?... Blz Vlww guy
– Vinicius.Beloni
This way it goes. Only with Apis could you manipulate the boxes, yet I’m not saying that they allow it, only that it’s a possibility. But if you are going to use the API I find it unlikely that you need to use the mail server.
– Maniero
It was just a little uncomfortable, so if I’m not fooled, they write an email for it. Anyway. vlw man
– Vinicius.Beloni