fix: move sender name to Reply-To
This commit is contained in:
parent
ee8a2cb569
commit
5d10f251a8
@ -22,7 +22,7 @@ public class ContactController : Controller
|
||||
{
|
||||
_logger = logger;
|
||||
_configuration = configuration;
|
||||
|
||||
|
||||
IConfigurationSection mailConfiguration = configuration.GetSection("Mail");
|
||||
_destination = mailConfiguration.GetSection("Destination");
|
||||
_sender = mailConfiguration.GetSection("Sender");
|
||||
@ -61,9 +61,9 @@ public class ContactController : Controller
|
||||
{
|
||||
await sender.WriteEmail
|
||||
.To("Oliver Booth", _destination.Get<string>())
|
||||
.From(name, _sender.Get<string>())
|
||||
.ReplyTo(email)
|
||||
.Subject($"[Contact via Website] {subject}")
|
||||
.From("Contact via Website", _sender.Get<string>())
|
||||
.ReplyTo(name, email)
|
||||
.Subject(subject)
|
||||
.BodyText(message)
|
||||
.SendAsync();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user