0
I can already send an email normally. I just can’t change DisplayName
.
Follows code :
var body = "<p>Email From: {0} ({1})</p><p>Message:</p><p>{2}</p>";
var message = new MailMessage();
message.From.DisplayName = "Nome Nome";
message.To.Add(new MailAddress("[email protected]"));
message.Subject = "Teste Subject";
message.Body = string.Format(body);
message.IsBodyHtml = true;
using (var smtp = new SmtpClient())
{
await smtp.SendMailAsync(message);
}
On the line message.From.DisplayName = "Nome Nome";
, how can I change DisplayName
?
Nice brother !!!
– Matheus Miranda