Skip to content

Commit

Permalink
fix(mail): cannot use sender name
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 3, 2024
1 parent 71db859 commit d5dcef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GZCTF/Services/Mail/MailSender.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Concurrent;
using System.Collections.Concurrent;
using System.Net.Security;
using System.Text;
using GZCTF.Models.Internal;
Expand Down Expand Up @@ -126,7 +126,7 @@ public async Task SendMailContent(MailContent content)

var title = $"{content.Title} - {content.Platform}";

var sender = string.IsNullOrWhiteSpace(_options!.SenderName) ? _options.SenderName : content.Platform;
var sender = string.IsNullOrWhiteSpace(_options!.SenderName) ? content.Platform : _options.SenderName;
var from = new MailboxAddress(sender, _options.SenderAddress);

var to = new MailboxAddress(content.UserName, content.Email);
Expand Down

0 comments on commit d5dcef3

Please sign in to comment.