Skip to content

Commit

Permalink
Respect DMARC rules by using Reply-To in emails
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-lerch committed Nov 18, 2023
1 parent 21a1240 commit 06abcc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TravelBlog/Services/MailingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public async Task<bool> SendMailAsync(string address, string name, string subjec
var sender = new MailboxAddress(options.SenderName, options.SenderAddress);
var author = string.IsNullOrEmpty(options.AuthorAddress) ? sender : new MailboxAddress(options.AuthorName, options.AuthorAddress);
var message = new MimeMessage();
message.From.Add(author);
message.Sender = sender;
message.From.Add(sender);
message.ReplyTo.Add(author);
message.To.Add(new MailboxAddress(name, address));
message.Subject = subject;
message.Body = new TextPart("plain")
Expand Down

0 comments on commit 06abcc0

Please sign in to comment.