Skip to content

Commit

Permalink
SmtpMessageChannel: Fixing that the "reply to" address should fall ba…
Browse files Browse the repository at this point in the history
…ck to site settings if not provided in the current email
  • Loading branch information
BenedekFarkas committed Mar 11, 2024
1 parent 44dcc86 commit 8449ead
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public void Process(IDictionary<string, object> parameters) {
fromAddress.Name = string.IsNullOrWhiteSpace(emailMessage.FromName) ? _smtpSettings.FromName : emailMessage.FromName;
mailMessage.From.Add(fromAddress);

if (!String.IsNullOrWhiteSpace(emailMessage.ReplyTo)) {
mailMessage.ReplyTo.AddRange(ParseRecipients(emailMessage.ReplyTo));
}
mailMessage.ReplyTo.AddRange(ParseRecipients(string.IsNullOrWhiteSpace(emailMessage.ReplyTo)
? _smtpSettings.ReplyTo
: emailMessage.ReplyTo));

if (emailMessage.NotifyReadEmail) {
mailMessage.Headers.Add("Disposition-Notification-To", mailMessage.From.ToString());
Expand Down

0 comments on commit 8449ead

Please sign in to comment.